[api-minor] Simplify BaseCMapReaderFactory by having the worker-thread create the filename#20939
Open
Snuffleupagus wants to merge 1 commit intomozilla:masterfrom
Open
Conversation
…ead create the `filename` The `BaseCMapReaderFactory`, `BaseStandardFontDataFactory`, and `BaseWasmFactory` classes are all very similar, and the only difference is really in their respective `fetch` methods. By have the worker-thread "compute" the complete `filename` it's possible to simplify the `BaseCMapReaderFactory.prototype.fetch` method, which will allow future improvements to all of these classes. A couple of things to note: - This code is unused, and it's not even bundled, in the Firefox PDF Viewer. - In browsers it's unused by default, and worker-thread fetching will always be used when possible since that's more efficient. *Please note:* For users that provide a custom `CMapReaderFactory` instance when calling `getDocument` this could be a breaking change, however it's unlikely that any such users exist. (The *internal* format of this data was changed previously in PR 18951, and there hasn't been a single question/complaint about it in well over a year.)
Collaborator
Author
|
/botio-linux test |
Collaborator
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/95dfb407c6c415f/output.txt |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20939 +/- ##
===========================================
+ Coverage 7.66% 62.61% +54.95%
===========================================
Files 48 174 +126
Lines 18839 121931 +103092
===========================================
+ Hits 1444 76353 +74909
- Misses 17395 45578 +28183
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/95dfb407c6c415f/output.txt Total script time: 46.12 mins
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
BaseCMapReaderFactory,BaseStandardFontDataFactory, andBaseWasmFactoryclasses are all very similar, and the only difference is really in their respectivefetchmethods.By have the worker-thread "compute" the complete
filenameit's possible to simplify theBaseCMapReaderFactory.prototype.fetchmethod, which will allow future improvements to all of these classes.A couple of things to note:
Please note: For users that provide a custom
CMapReaderFactoryinstance when callinggetDocumentthis could be a breaking change, however it's unlikely that any such users exist.(The internal format of this data was changed previously in PR #18951, and there hasn't been a single question/complaint about it in well over a year.)