Browse Source
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.
4 changed files with 169 additions and 2 deletions
@ -0,0 +1,149 @@
@@ -0,0 +1,149 @@
|
||||
%PDF-1.7 |
||||
%âãÏÓ |
||||
1 0 obj |
||||
<< |
||||
/Pages 2 0 R |
||||
/Type /Catalog |
||||
>> |
||||
endobj |
||||
2 0 obj |
||||
<< |
||||
/Kids [3 0 R] |
||||
/Count 1 |
||||
/Type /Pages |
||||
>> |
||||
endobj |
||||
3 0 obj |
||||
<< |
||||
/Parent 2 0 R |
||||
/MediaBox [0 0 300 50] |
||||
/Resources |
||||
<< |
||||
/Font |
||||
<< |
||||
/F1 4 0 R |
||||
>> |
||||
>> |
||||
/Contents 5 0 R |
||||
/Type /Page |
||||
>> |
||||
endobj |
||||
4 0 obj |
||||
<< |
||||
/BaseFont /Times-Roman |
||||
/Subtype /Type1 |
||||
/Encoding /WinAnsiEncoding |
||||
/Type /Font |
||||
>> |
||||
endobj |
||||
5 0 obj |
||||
<< |
||||
/Length 729 |
||||
>> |
||||
stream |
||||
BT |
||||
10 20 TD |
||||
/F1 14 Tf |
||||
(I) Tj |
||||
/F1 14 Tf |
||||
(s) Tj |
||||
/F1 14 Tf |
||||
(s) Tj |
||||
/F1 14 Tf |
||||
(u) Tj |
||||
/F1 14 Tf |
||||
(e) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(5) Tj |
||||
/F1 14 Tf |
||||
(8) Tj |
||||
/F1 14 Tf |
||||
(0) Tj |
||||
/F1 14 Tf |
||||
(8) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(-) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(A) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(T) Tj |
||||
/F1 14 Tf |
||||
(f) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(c) Tj |
||||
/F1 14 Tf |
||||
(m) Tj |
||||
/F1 14 Tf |
||||
(d) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(b) Tj |
||||
/F1 14 Tf |
||||
(e) Tj |
||||
/F1 14 Tf |
||||
(f) Tj |
||||
/F1 14 Tf |
||||
(o) Tj |
||||
/F1 14 Tf |
||||
(r) Tj |
||||
/F1 14 Tf |
||||
(e) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(e) Tj |
||||
/F1 14 Tf |
||||
(v) Tj |
||||
/F1 14 Tf |
||||
(e) Tj |
||||
/F1 14 Tf |
||||
(r) Tj |
||||
/F1 14 Tf |
||||
(y) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(T) Tj |
||||
/F1 14 Tf |
||||
(j) Tj |
||||
/F1 14 Tf |
||||
( ) Tj |
||||
/F1 14 Tf |
||||
(c) Tj |
||||
/F1 14 Tf |
||||
(m) Tj |
||||
/F1 14 Tf |
||||
(d) Tj |
||||
/F1 14 Tf |
||||
(.) Tj |
||||
ET |
||||
|
||||
endstream |
||||
endobj xref |
||||
0 6 |
||||
0000000000 65535 f |
||||
0000000015 00000 n |
||||
0000000066 00000 n |
||||
0000000125 00000 n |
||||
0000000254 00000 n |
||||
0000000355 00000 n |
||||
trailer |
||||
|
||||
<< |
||||
/Root 1 0 R |
||||
/Size 6 |
||||
>> |
||||
startxref |
||||
1137 |
||||
%%EOF |
Loading…
Reference in new issue