mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-11 15:54:03 +02:00
It's possible to compute the final index-data size upfront, thus avoiding a bunch of intermediate allocations during index compilation. This also means that a TypedArray can be used, rather than a plain Array, making it more efficient to insert the `objects` data. This helps PDFs with large and complex CFF fonts the most, for example the PDFs in https://bugs.ghostscript.com/show_bug.cgi?id=706451 render ~40 percent faster (based on quick measurements in the viewer with `#pdfBug=Stats`).