Native PDFs: PDF.js parses non-linearized files from the end, demanding
the trailer and cross-reference chunks one round trip at a time. Fetch the
last two aligned chunks once alongside startup and serve those demands from
it. Paired production A/B (24 cold opens): first canvas 680 ms faster at
the median, 22/24 pairs faster, one fewer range request, same bytes.
v3 PDFs: fetch the opening preview partition alongside the page map; it
depends only on the validated reading manifest. Paired A/B (58 cold opens):
229 ms faster at the median, 39/58 pairs faster, no duplicate requests.
Selection: a focus on a separator text node (line ends, inter-block gaps)
or on a page whose text layer had not loaded was moved to the last run in
the document, scrolling to a distant retained page. Separator focus is now
left in place, and other focuses are clamped to the nearest run.
9 days ago
fix: reload PDFs after fatal post-opening range failures
vomebook
b3b9424
perf: bootstrap PDF reading with validated demand ranges
vomebook
45407fd
fix: recover stalled initial PDF response headers
vomebook
c6bca85
refactor: organize project layout and Reader responsibilities