mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Improve performance when reading very large TrueType "cmap" tables (issue 19319)
In the affected font the total number of mapping-entries is `1142348`, and no less than `997473` of them are duplicates. Given that every duplicate causes a lot of Array elements to be moved this becomes extremely inefficient, which we can avoid by keeping track of seen `charCode`s and directly build the final mappings-Array instead.
This commit is contained in:
parent
e1b972aac3
commit
5e569cade5
3 changed files with 21 additions and 5 deletions
1
test/pdfs/issue19319.pdf.link
Normal file
1
test/pdfs/issue19319.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://github.com/user-attachments/files/18396493/2023-ESG-report-eng.pdf
|
|
@ -11254,5 +11254,15 @@
|
|||
"rounds": 1,
|
||||
"link": true,
|
||||
"type": "other"
|
||||
},
|
||||
{
|
||||
"id": "issue19319",
|
||||
"file": "pdfs/issue19319.pdf",
|
||||
"md5": "8612d3f0cf2dd067ea4aec9c8bf98763",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"firstPage": 2,
|
||||
"lastPage": 2,
|
||||
"type": "eq"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue