lab.Independent engineering
by Kristian Salmeron
PDF LOADING / LAB 001ROUND TWO · COMPLETE

How soon can a PDF
show its first page?

One document, arranged two ways. A controlled look at the journey from loading a PDF to rendering its first page.

ROUND TWO

The render gap grew when we removed the delay.

With range loading enabled, the linearized PDF rendered its first page 405–414 ms later than the nonlinearized PDF at 0 ms of header delay, compared with 80–105 ms later at 100 ms.

See the round-two results

NOVEMBER 19 CAMPAIGN

One accepted window. Not enough to compare runs.

The campaign ended with one accepted window, one rejected attempt and one missed slot. We can describe the accepted run, but the planned comparison needed at least two.

  1. 01 / Pacific

    Rejected

    Clock uncertainty exceeded the 5 ms limit.

  2. 02 / Pacific

    Missed

    The start deadline passed. Neither runner was invoked.

  3. 03 / Pacific

    Accepted

    All 64 performance trials passed; 48 measured trials retained.

THE CONSTANTS

100 pages per PDF

Same first page & viewport

PDF.js + Chromium

01 / THE QUESTION

Same pages.
Different order of bytes.

A linearized PDF arranges its data to help a reader start with the first page before it has the whole file. The visible document stays the same.

Does that arrangement make the first page render sooner in PDF.js? And does the answer change when the viewer can request just part of the file?

We compare the original pair under a fixed delivery profile, with range requests enabled and disabled. The question is deliberately small: one pair, one renderer, one declared setup.

02 / THE METHOD

A comparison with the controls in view.

A / KEEP THE CONTENT

One synthetic source

Both PDFs have the same 100 pages. Structure checks and pixel comparisons establish the input controls; they do not measure speed.

B / CONTROL DELIVERY

Four conditions

Linearized or nonlinearized, each with ranges on or off. The controlled profile delays headers by 100 ms and shares a 1 Mbit/s body budget.

C / KEEP EVERY OUTCOME

A fixed stopping rule

Three scheduled windows. Unchanged acceptance checks. No replacement run for a result we do not like.

Read the declared protocol

03 / WHAT THE CLOCK MEANS

Render completion,
precisely defined.

The timer starts just before PDF.js begins loading the document and stops when the first page’s canvas-render promise resolves. Worker startup, transfer, parsing and rendering are included.

This does not tell us when pixels reach a physical display. Browser launch, navigation, verification and screenshot capture sit outside the measured interval.

Read the limits of the measurement

FOR THE CURIOUS

Follow the evidence.

See the run ledger, earlier diagnostics and why a rejected result still matters.

Open the research record

FOR THE HANDS-ON

Make your own attempt.

Get the original PDFs, prepare a separate workspace and keep a record you can inspect.

Follow the replication guide
What makes a finding worth publishing?

A method you can repeat, raw measurements you can inspect, and limits stated alongside the conclusion. An attempted measurement is not automatically an accepted finding. Read the publication standards.