Repository navigation
v0.52.0 — a profile read 389 times a page, now read once
An ICC profile is now read once per object, not 389 times a page
§24 of the conformance baseline named a cluster: five French tax and administrative
forms losing to poppler by five to eight times. Profiling the worst — an 801 KB
form taking 735.9 ms — put 43% of the page in compress/flate. The shape said
many streams rather than one large one, and the count said why: colourSpace was
entered 389 times on one page, and two objects accounted for 235 of them. Fonts
were cached by object number, soft masks by key, and colour spaces not at all — so
every entry re-decompressed an ICC profile stream and re-parsed it.
| document | before | after | vs poppler | |
|---|---|---|---|---|
2047_2047_5488.pdf |
735.9 ms | 26.2 ms | 28× | 7.8× slower → 0.28× |
2042_2042_5475.pdf |
641.1 ms | 39.8 ms | 16× | → 0.44× |
2042_2042_5474.pdf |
465.7 ms | 31.8 ms | 15× | → 0.39× |
cerfa_12496.pdf |
695.5 ms | 37.0 ms | 19× | → 0.28× |
b31820797.pdf |
685.7 ms | 673.2 ms | 1.0× | control: no ICC space |
The control is the point: a page with no ICC space does not move, so the mechanism is
the explanation rather than a story about it.
The cache is keyed on the profile stream's object number, not the colour space
entry's. A referenced colour-space array may contain a name, and a name resolves
through the caller's /Resources; a profile depends on its own bytes and /N alone.
All 3 215 corpus documents render byte-identical to v0.51.0.