Skip to content

Reduce redundant managed barcode rotation passes - #548

Merged
Szer merged 1 commit into
mainfrom
perf/coupon-managed-autorotate
Oct 5, 2026
Merged

Szer merged 1 commit into
mainfrom
perf/coupon-managed-autorotate

Conversation

@Szer

@Szer Szer commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Managed EAN-13 fallback spends extra CPU repeating rotation passes on difficult images. Set BarcodeReaderGeneric.AutoRotate=false; the EAN-13 reader retains its internal rotation fallback through TryHarder and RotateSupported. Native rotation, all crops, preprocessing, and worker limits stay unchanged.

Validation:

  • All 40 OCR regression tests pass.
  • Three paired ARM64 passes of the actual PR assembly preserve every output on all 2,201 original coupon photos: 2,181 correct, 1 wrong, 19 no-reads; no decoder warnings or OCR calls during the benchmark.
  • Using per-image medians across the three passes, mean barcode-stage latency falls 26.78 → 21.75 ms (19%), p99 473.96 → 279.05 ms (41%), and mean CPU 29.22 → 22.61 ms (23%). The 52 difficult photos average 586 → 373 ms.

These measurements cover local barcode decoding on the original uploaded corpus, excluding Azure/network latency. Azure OCR call behavior is unchanged.

@Szer
Szer marked this pull request as ready for review October 5, 2026 09:50
@Szer
Szer enabled auto-merge (squash) October 5, 2026 09:50
@Szer
Szer merged commit 47a8c4e into main Oct 5, 2026
8 checks passed
@Szer
Szer deleted the perf/coupon-managed-autorotate branch October 5, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant