Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Scanning contents" progress bar with --redo-ocr #1441

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aliemjay
Copy link

@aliemjay aliemjay commented Dec 5, 2024

A followup fix to #1378.

The progress bar stalls at 0% until all pages are parsed and cached, which takes pretty much of the total run time (thanks to #1380). Fix this by lazy caching.

Test file: blank-10k.pdf
Test command: ocrmypdf --redo-ocr blank-10k.pdf out.pdf

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.19%. Comparing base (cc058be) to head (6d2d870).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/ocrmypdf/pdfinfo/layout.py 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1441   +/-   ##
=======================================
  Coverage   90.18%   90.19%           
=======================================
  Files          95       95           
  Lines        7073     7070    -3     
  Branches      722      720    -2     
=======================================
- Hits         6379     6377    -2     
+ Misses        491      490    -1     
  Partials      203      203           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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