InteractiveChecklists icon indicating copy to clipboard operation
InteractiveChecklists copied to clipboard

🚨 Large PDF outline parsing re-parses document on every page change

Open arn-c0de opened this issue 11 months ago • 1 comments

Summary

When opening large PDF files, outline and page-list parsing fails to complete and effectively gets stuck.
The outlines do not load, and the parser repeatedly re-runs expensive parsing logic.
Small PDF files do not exhibit this issue.

Steps to Reproduce

  1. Open a large PDF (e.g. F18-ABCD-Flight_Manual.pdf, ~900 pages) in the app.
  2. Navigate between pages (swipe or jump).
  3. Observe Logcat output, UI responsiveness, and CPU usage.

Actual Behavior

  • PdfStructureParser repeatedly parses xref tables and rebuilds the page list on every page change.
  • Parsing is triggered even though the document is already open and flagged as cached.
  • Outline and page-list loading never completes for large PDFs.
  • Each page navigation causes:
    • High CPU usage
    • UI stalls/freezes
    • Repetitive log output

Expected Behavior

  • Outline and page-list parsing should complete once per document.
  • Parsed structures should be cached and reused for all page navigations.
  • Large PDFs should behave the same as small PDFs, without repeated parsing or UI degradation.

arn-c0de avatar Dec 14 '25 14:12 arn-c0de

Fixed in 1.0.9 Commit 1f9eb9e "PDF_Parser big file FULL FIX"

arn-c0de avatar Dec 14 '25 15:12 arn-c0de