Skip to content

[intern-25] Tối ưu pipeline PDF: bỏ extract pdf-inspector trùng - #402

Open
CodingMinh wants to merge 1 commit into
masterfrom
intern/25-e2e-optimization
Open

[intern-25] Tối ưu pipeline PDF: bỏ extract pdf-inspector trùng#402
CodingMinh wants to merge 1 commit into
masterfrom
intern/25-e2e-optimization

Conversation

@CodingMinh

Copy link
Copy Markdown
Collaborator

Summary

  • Bỏ probe_pages_needing_ocr upfront; fast path (filtered / parallel) return sớm không gọi extract
  • Slow path: một lần extract_pages_markdown_mem → reuse cho needs_ocr flags + via_pdf_inspector(prefetched)
  • Benchmark bench/sample10/pdf: 768 → 160 ms/file TB (−79.2%), output markdown không đổi (5/5 PDF)

Test plan

  • cargo test -p fileconv-core pdf:: (28 passed)
  • make check-static
  • RUST_CRATES=core bash scripts/run-rust-ci-fast.sh
  • fileconv speed bench/sample10/pdf before/after
  • Regression diff 5 PDF sample10 — identical

Closes #363

Made with Cursor

Bỏ probe upfront; fast path return sớm không parse. Slow path reuse một
extract_pages_markdown_mem cho needs_ocr và via_pdf_inspector (~79% nhanh hơn
trên bench/sample10/pdf, output không đổi).

Closes #363

Co-authored-by: Cursor <cursoragent@cursor.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.

[intern-25] End-to-end optimization: profile & improve conversion pipeline

1 participant