Cache the TextDecoder/TextEncoder instances used when compiling/decompiling font-data - #21806
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21806 +/- ##
==========================================
- Coverage 90.19% 90.17% -0.02%
==========================================
Files 264 264
Lines 67324 67327 +3
==========================================
- Hits 60721 60715 -6
- Misses 6603 6612 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ecompiling font-data This avoids creating "duplicate" `TextDecoder`/`TextEncoder` instances. For example, when rendering all 1310 pages of the `pdf.pdf` document (from the test-suite) this patch reduces the number of `TextDecoder`/`TextEncoder` instances from `73` *each* to just a single one each. *Note:* Compared to PR 21801 the reduction is obviously much smaller, however it still seems worthwhile to avoid unnecessary object creation.
e372f22 to
ea5ecb0
Compare
|
/botio browsertest |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/6845a319ab9942d/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/7a41e42ff594470/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/7a41e42ff594470/output.txt Total script time: 18.07 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/6845a319ab9942d/output.txt Total script time: 23.12 mins
|
|
Makes sense; thank you for optimizing this! |
This avoids creating "duplicate"
TextDecoder/TextEncoderinstances.For example, when rendering all 1310 pages of the
pdf.pdfdocument (from the test-suite) this patch reduces the number ofTextDecoder/TextEncoderinstances from73each to just a single one each.Note: Compared to PR #21801 the reduction is obviously much smaller, however it still seems worthwhile to avoid unnecessary object creation.