pdf.js/test/pdfs/issue5808.pdf
Jonas Jenwald 77c6ed5389 Attempt to ignore multiple identical Tf (setFont) commands in PartialEvaluator_getTextContent (issue 5808)
This patch improves the performance of issue 5808, but I'm not sure if it's enough to call it fixed. On average, this patch reduces the number of textLayer div's by a factor of 3, and it also reduces the time spend in `getTextContent` by a factor of ~2.

The PDF file is generated by `Scribus PDF`, which for reasons I cannot understand is placing redundant `Tf` commands before *every* showText command.
Note how the PDF file also contains lots of (basically) identical fonts, but with slightly different names, which causes unnecessary font-switching. This causes some unnecessary breaking of textLayer div's, but this issue cannot be easily worked around.
2016-07-27 21:37:52 +02:00

1.3 KiB