Skip to content

Lazily create a single DOMSVGFactory for all annotationLayers - #22408

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:AnnotationElement-shadow-svgFactory
Oct 30, 2026
Merged

timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:AnnotationElement-shadow-svgFactory

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Given that the DOMSVGFactory constructor takes no parameters, we can re-use a single instance for all annotationLayers. This is also consistent with e.g. the drawLayers.

Given that the `DOMSVGFactory` constructor takes no parameters, we can re-use a single instance for all annotationLayers. This is also consistent with e.g. the drawLayers.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Reference tests

Results for 0edd9bd (run, references from mozilla/pdf.js.refs@c5cf6c9ab0).

Platform Status Tests Total runtime Errors Different FBF No reference Report
Linux ✅ 1413 13m 53s 0 0 0 0
Windows ⚠️ 1413 14m 3s 0 1 0 0 view differences

The report is kept for 30 days and replaced by the next run.

sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Viewer preview

🗑️ Viewer previews removed.

@codecov-commenter

codecov-commenter commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.58%. Comparing base (aa89148) to head (0edd9bd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22408      +/-   ##
==========================================
- Coverage   90.58%   90.58%   -0.01%     
==========================================
  Files         278      278              
  Lines       68568    68573       +5     
==========================================
+ Hits        62115    62117       +2     
- Misses       6453     6456       +3     
Flag Coverage Δ
browsertest 66.28% <100.00%> (-0.01%) ⬇️
fonttest 8.99% <ø> (ø)
integrationtest 69.54% <100.00%> (-0.01%) ⬇️
unittest 61.25% <0.00%> (-0.02%) ⬇️
unittestcli 59.00% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Oct 30, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 4.44%

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 86 untouched benchmarks
⏩ 174 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ JBig2CCITTFaxImage.decode: JBIG2 text region (bitmap-symbol.pdf) 766.9 µs 956 µs -19.78%
⚡ PartialEvaluator.buildPath: lines (bug1743245.pdf) 19.2 ms 16.9 ms +13.84%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Snuffleupagus:AnnotationElement-shadow-svgFactory (0edd9bd) with master (22f5df1)2

Open in CodSpeed

Footnotes

  1. 174 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on master (aa89148) during the generation of this report, so 22f5df1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Oct 30, 2026
@timvandermeij
timvandermeij merged commit 743102c into mozilla:master Oct 30, 2026
31 of 32 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Good idea; thank you!

sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Oct 30, 2026
@Snuffleupagus
Snuffleupagus deleted the AnnotationElement-shadow-svgFactory branch October 30, 2026 21:33

This branch was successfully deployed

1 active deployment
sync_pdfs — 0edd9bd2 Deployed Oct 30, 2026 by Snuffleupagus via request #674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants