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.
8 days ago
feat: consume unified Reader snapshots and vector previews