Update PDF.js to new version 89ccc3a526b868534df4f621145b31c528c0ccaa from 2025-03-01 13:24:49
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert, Whiteboard: [3pl-filed][task_id: Uh7MD7K1SBmIJT0GPvlPyQ])
Attachments
(1 file)
This update covers 9 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/PdfJsDefaultPrefs.js | 1 +
toolkit/components/pdfjs/content/build/pdf.mjs | 10 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 283 ++++++++-----
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 19 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 63 ++-
toolkit/components/pdfjs/content/web/viewer.css | 40 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 63 ++-
toolkit/components/pdfjs/content/web/wasm/openjpeg.wasm | Bin
toolkit/components/pdfjs/moz.yaml | 4 +-
10 files changed, 331 insertions(+), 156 deletions(-)
4be79748c9b83d4971a364c2997dc6b166d6b025 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/4be79748c9b83d4971a364c2997dc6b166d6b025
Authored: 2025-02-28 19:11:42 +0100
Committed: 2025-03-01 14:21:05 +0100
Add a GlobalColorSpaceCache
to reduce unnecessary re-parsing
This complements the existing LocalColorSpaceCache
, which is unique to each getOperatorList
-invocation since it also caches by Name
, which should help reduce unnecessary re-parsing especially for e.g. ICCBased
ColorSpaces once we properly support those.
Files Modified:
- src/core/annotation.js
- src/core/catalog.js
- src/core/colorspace.js
- src/core/default_appearance.js
- src/core/document.js
- src/core/evaluator.js
- src/core/image.js
- src/core/image_utils.js
- src/core/pattern.js
- test/unit/colorspace_spec.js
- test/unit/default_appearance_spec.js
c565810a3d4657cd0c0914f58446f0bdadd00c0c by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/c565810a3d4657cd0c0914f58446f0bdadd00c0c
Authored: 2025-02-28 21:25:51 +0100
Committed: 2025-02-28 21:25:51 +0100
Fix the build of the openjpeg decoder in order to use an optimized build of the openjpeg library (bug 1951128)
Files Modified:
- external/openjpeg/openjpeg.wasm
7273db2e357a04b3a62af43b734de0efdf21ede9 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/7273db2e357a04b3a62af43b734de0efdf21ede9
Authored: 2025-02-28 12:41:47 +0100
Committed: 2025-02-28 14:47:48 +0100
Don't attempt to use auto-linking in XFA documents (PR 19110 follow-up)
Auto-linking requires a normal textLayer which XFA documents obviously don't have, and currently XFA documents cause "pointless" error messages to be logged in the console.
Files Modified:
- web/pdf_page_view.js
bdfa96878dc8361ac558cc9b1f639faabd557f4b by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/bdfa96878dc8361ac558cc9b1f639faabd557f4b
Authored: 2025-02-26 14:50:50 +0100
Committed: 2025-02-26 15:17:11 +0100
Invoke TranslatedFont.prototype.loadType3Data
only once per font
Currently we're first loading the font, and then for Type3 fonts we're invoking loadType3Data
every time that the font is encountered.
That seems completely unnecessary, and it's probably connected to the age of this code, since the loadType3Data
-method will only run once anyway (note the caching).
Files Modified:
- src/core/catalog.js
- src/core/evaluator.js
59cb9a064ef107c5f4e9a38f6fbaf22c109c95bf by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/59cb9a064ef107c5f4e9a38f6fbaf22c109c95bf
Authored: 2025-02-26 10:07:28 +0100
Committed: 2025-02-26 10:16:06 +0100
Extend getGlyphMapForStandardFonts
with some Cyrillic entries (issue 19550)
Files Added:
- test/pdfs/issue19550.pdf
Files Modified:
- src/core/standard_fonts.js
- test/pdfs/.gitignore
- test/test_manifest.json
4069c3a422c49148c260fd94aeaedd103c574b6b by Hector Rincon <hecerinc@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/4069c3a422c49148c260fd94aeaedd103c574b6b
Authored: 2025-02-25 22:00:32 -0800
Committed: 2025-02-25 22:00:32 -0800
Reenable viewerCssTheme option for Firefox
The viewerCssTheme
was removed in #17222 and subsequently reenabled in #17293,
but only for Chromium and generic builds. This commit reenables the
function using the new method introduced in #17293.
Files Modified:
- gulpfile.mjs
- web/app.js
- web/app_options.js
71ad9fd0b7ba4cdbe6381d782675ba071c4f4640 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/71ad9fd0b7ba4cdbe6381d782675ba071c4f4640
Authored: 2025-02-25 13:04:07 +0100
Committed: 2025-02-25 13:11:51 +0100
Abort various timeouts, in PDFViewer
, when closing the document (PR 19128 follow-up)
Looking at recent integration-test logs there's occasionally warnings about trying to invoke PDFViewer.prototype.update
too late, which probably started with PR 19128 (see log excerpt below).
Given that we already had another timeout before that PR the problem was pre-existing, but it seems to trigger more easily now.
JavaScript warning: http://127.0.0.1:42333/build/generic/web/viewer.mjs, line 12668: Script terminated by timeout at:
update@http://127.0.0.1:42333/build/generic/web/viewer.mjs:12668:9
@http://127.0.0.1:42333/build/generic/web/viewer.mjs:12373:12
setTimeout handler*_scrollUpdate@http://127.0.0.1:42333/build/generic/web/viewer.mjs:12371:29
viewAreaElementScrolled@http://127.0.0.1:42333/build/generic/web/viewer.mjs:154:15
FrameRequestCallback*debounceScroll@http://127.0.0.1:42333/build/generic/web/viewer.mjs:140:18
EventListener.handleEvent*watchScroll@http://127.0.0.1:42333/build/generic/web/viewer.mjs:165:19
PDFViewer@http://127.0.0.1:42333/build/generic/web/viewer.mjs:11777:19
_initializeViewerComponents@http://127.0.0.1:42333/build/generic/web/viewer.mjs:15081:23
initialize@http://127.0.0.1:42333/build/generic/web/viewer.mjs:14931:16
async*run@http://127.0.0.1:42333/build/generic/web/viewer.mjs:15227:16
webViewerLoad@http://127.0.0.1:42333/build/generic/web/viewer.mjs:17078:24
@http://127.0.0.1:42333/build/generic/web/viewer.mjs:17082:3
Files Modified:
- web/pdf_viewer.js
cec32c617739fa3d74b56521e6715d4fa6f069e3 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/cec32c617739fa3d74b56521e6715d4fa6f069e3
Authored: 2025-02-25 12:33:13 +0100
Committed: 2025-02-25 12:33:13 +0100
Use more local variables in PDFViewerApplication._initializeViewerComponents
This, ever so slightly, shortens the code which can never hurt.
Files Modified:
- web/app.js
132ccf04db9c28a7e96416747dbe304571b99e01 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/132ccf04db9c28a7e96416747dbe304571b99e01
Authored: 2025-02-24 12:27:51 +0100
Committed: 2025-02-24 12:27:51 +0100
[api-minor] Stop exporting, by default, a few additional Font properties (PR 11777 follow-up)
None of the "composite", "subtype", or "type" properties are normally used on the main-thread and/or in the API, hence there's no need to include them in the exported font-data by default.
Given that these properties may still be useful when debugging, and that debugger.mjs
actually relies on the "type" property, they will instead only be sent to the main-thread when the fontExtraProperties
API-option is used.
Files Modified:
- src/core/fonts.js
Reporter | ||
Comment 1•20 days ago
|
||
Uh7MD7K1SBmIJT0GPvlPyQ |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=08638ff7cb702b8b865f510ec217520277b971de
Reporter | ||
Comment 2•20 days ago
|
||
Updated•20 days ago
|
Reporter | ||
Comment 3•20 days ago
|
||
ZpxnmbFhQeGZTFFpniPvdA |
All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...
Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
Reporter | ||
Updated•19 days ago
|
Comment 5•18 days ago
|
||
bugherder |
Comment 6•18 days ago
|
||
This lead to a 4.6KB increase in the installer size on Windows. This is below any alert-able threshold, so this comment is only a FYI
Updated•15 days ago
|
Comment 7•15 days ago
|
||
(In reply to Cristian Tuns from comment #5)
Perfherder has detected a talos performance change from push 747812f436d601733f4116515534d015e9d5031a.
Improvements:
Ratio | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|
17% | pdfpaint bug1749563.pdf | linux1804-64-shippable-qr | e10s fission stylo webrender-sw | 1,731.34 -> 1,437.76 |
17% | pdfpaint bug1749563.pdf | linux1804-64-shippable-qr | e10s fission stylo webrender | 1,777.62 -> 1,477.00 |
15% | pdfpaint bug1901253.pdf | windows11-64-shippable-qr | e10s fission stylo webrender-sw | 7,483.47 -> 6,329.10 |
15% | pdfpaint bug1749563.pdf | windows11-64-shippable-qr | e10s fission stylo webrender-sw | 894.11 -> 756.52 |
15% | pdfpaint bug1901253.pdf | macosx1470-64-shippable | e10s fission stylo webrender-sw | 13,939.80 -> 11,801.53 |
... | ... | ... | ... | ... |
6% | pdfpaint issue17289.pdf | windows11-64-shippable-qr | e10s fission stylo webrender | 760.92 -> 714.26 |
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.
You can run these tests on try with ./mach try perf --alert 44203
For more information on performance sheriffing please see our FAQ.
Description
•