Skip to content

Reduce duplication in the PostScript Lexer.prototype.next method - #22377

Merged
Snuffleupagus merged 1 commit into
mozilla:masterfrom
Snuffleupagus:PostScript-Lexer-rm-next-duplication
Oct 28, 2026
Merged

Snuffleupagus merged 1 commit into
mozilla:masterfrom
Snuffleupagus:PostScript-Lexer-rm-next-duplication

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

The "." case can be combined with the "+" and "-" cases, thus reducing the code size a tiny bit.

The "." case can be combined with the "+" and "-" cases, thus reducing the code size a tiny bit.
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Reference tests

Results for 3c0b429 (run, references from mozilla/pdf.js.refs@4694e71d21).

Platform Status Tests Total runtime Errors Different FBF No reference Report
Linux ⚠️ 1413 12m 26s 0 1 0 0 view differences
Windows ✅ 1413 17m 47s 0 0 0 0

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

@codecov-commenter

codecov-commenter commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.58%. Comparing base (e7aa97b) to head (3c0b429).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #22377   +/-   ##
=======================================
  Coverage   90.57%   90.58%           
=======================================
  Files         278      278           
  Lines       68560    68558    -2     
=======================================
+ Hits        62099    62102    +3     
+ Misses       6461     6456    -5     
Flag Coverage Δ
browsertest 66.29% <ø> (+0.01%) ⬆️
fonttest 8.99% <ø> (ø)
integrationtest 69.54% <ø> (+<0.01%) ⬆️
unittest 61.26% <ø> (-0.01%) ⬇️
unittestcli 59.01% <ø> (+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.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Viewer preview

🗑️ Viewer previews removed.

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

@calixteman calixteman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@codspeed

codspeed Bot commented Oct 28, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 10.56%

⚡ 2 improved benchmarks
✅ 86 untouched benchmarks
⏩ 174 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ Autolinker.processLinks: 10 links in each of 1000 text items 68.7 ms 62 ms +10.91%
⚡ FlateStream: content streams from a ChunkedStream (tracemonkey.pdf) 128 ms 116.1 ms +10.23%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Snuffleupagus:PostScript-Lexer-rm-next-duplication (3c0b429) with master (e7aa97b)

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. ↩

sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Oct 28, 2026
@Snuffleupagus
Snuffleupagus merged commit e226742 into mozilla:master Oct 28, 2026
32 checks passed
@Snuffleupagus
Snuffleupagus deleted the PostScript-Lexer-rm-next-duplication branch October 28, 2026 20:01
sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Oct 28, 2026

This branch was previously deployed

1 inactive deployment
sync_pdfs — 3c0b4297 Deployed Oct 28, 2026 by Snuffleupagus via request #656
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants