Skip to content

perf: add early page count check to prevent expensive PDFMiner proces… #4048

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CyMule
Copy link
Contributor

@CyMule CyMule commented Jul 8, 2025

…sing

# Early page count check for strategies that will use HI_RES
# This prevents expensive PDFMiner processing for documents that exceed page limits
pdf_hi_res_max_pages = kwargs.get("pdf_hi_res_max_pages")
if pdf_hi_res_max_pages is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please write a unit test to verify this behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I forgot to mark this as a draft. This is not ready for review and will have testing when complete

@CyMule CyMule marked this pull request as draft July 24, 2025 00:22
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.

2 participants