-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance when reading very large TrueType "cmap" tables (issue 19319) #19321
Conversation
…ssue 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.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/4d4e114b3162648/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/9f01c201fff634f/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/4d4e114b3162648/output.txt Total script time: 29.25 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/9f01c201fff634f/output.txt Total script time: 53.66 mins
|
Thank you for improving this! /botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/7ee2efbb5ae50ac/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/b79107b9d23add3/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/7ee2efbb5ae50ac/output.txt Total script time: 17.04 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/b79107b9d23add3/output.txt Total script time: 27.28 mins
|
In the affected font the total number of mapping-entries is
1142348
, and no less than997473
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.