Skip to content

feat: improving performance and robustness - #310

Open
PeterStaar-IBM wants to merge 10 commits into
mainfrom
feat/parse-performance-improvements
Open

feat: improving performance and robustness#310
PeterStaar-IBM wants to merge 10 commits into
mainfrom
feat/parse-performance-improvements

Conversation

@PeterStaar-IBM

@PeterStaar-IBM PeterStaar-IBM commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

This PR improves parsing throughput and memory behavior by reducing expensive font-resource JSON materialization, reusing already sanitized cells for
line-cell generation when the decode settings are equivalent, and avoiding redundant cell processing work. It also adds finer-grained timing keys for page
decoding, font decoding, sanitization, and word/line cell creation so performance analysis can identify the remaining hot spots more directly.

The build now forces Blend2D release assertion behavior for non-Debug artifacts and adds wheel checks to prevent shipping Blend2D debug assertion code.
The performance tooling was updated with better timing breakdowns, resumable comparison runs, PDF selection, parse/render content options, and refreshed
Apple M3 Max benchmark reports.

Changes

  • Read font metadata directly from QPDFObjectHandle instead of eagerly converting font dictionaries to JSON.
  • Add reusable QPDF object access helpers.
  • Reuse sanitized cells for line-cell output when the requested line-cell config matches the sanitized representation.
  • Split parser timings into more detailed nested buckets.
  • Avoid extra work when extracting one-page PDFs from one-page documents.
  • Add Blend2D release-mode compile/link settings and CI wheel assertion checks.
  • Improve benchmark scripts with config controls, reusable comparison CSV data, PDF filtering, and clearer timing breakdowns.
  • Add/update performance benchmark documentation and plots.

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @PeterStaar-IBM, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
dolfim-ibm
dolfim-ibm previously approved these changes Aug 10, 2026

@dolfim-ibm dolfim-ibm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
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