Skip to content

fix: improve performance in many places#199

Open
alexander-akait wants to merge 1 commit intomainfrom
fix-perf
Open

fix: improve performance in many places#199
alexander-akait wants to merge 1 commit intomainfrom
fix-perf

Conversation

@alexander-akait
Copy link
Copy Markdown
Member

Summary

What kind of change does this PR introduce?

Did you add tests for your changes?

Does this PR introduce a breaking change?

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Use of AI

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

⚠️ No Changeset found

Latest commit: 3a5fb5d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 92.92035% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.99%. Comparing base (5a07869) to head (3a5fb5d).

Files with missing lines Patch % Lines
lib/ReplaceSource.js 85.71% 2 Missing and 1 partial ⚠️
lib/RawSource.js 88.88% 2 Missing ⚠️
lib/OriginalSource.js 95.23% 1 Missing ⚠️
lib/SourceMapSource.js 83.33% 1 Missing ⚠️
lib/helpers/streamChunksOfRawSource.js 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #199      +/-   ##
==========================================
- Coverage   93.24%   92.99%   -0.26%     
==========================================
  Files          25       25              
  Lines        1866     1884      +18     
  Branches      595      594       -1     
==========================================
+ Hits         1740     1752      +12     
- Misses        117      122       +5     
- Partials        9       10       +1     
Flag Coverage Δ
integration 92.99% <92.92%> (-0.26%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 21, 2026

Merging this PR will degrade performance by 17.42%

⚡ 38 improved benchmarks
❌ 2 regressed benchmarks
✅ 107 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
cached-source: getCachedData() then restore 20.5 ms 18.3 ms +12.03%
cached-source: new CachedSource() 301.8 µs 342.7 µs -11.93%
cached-source: sourceAndMap() (cold) 20.5 ms 17.1 ms +20.3%
compat-source: wraps OriginalSource 35.3 ms 30.8 ms +14.57%
concat-source: map() 23 ms 19.6 ms +17.49%
helpers/getGeneratedSourceInfo: big source 9.2 ms 2.1 ms ×4.4
concat-source: size() 205.7 µs 117.8 µs +74.57%
helpers/getGeneratedSourceInfo: fixture 30.3 ms 9.7 ms ×3.1
cached-source: streamChunks() (cold) 11.5 ms 8.8 ms +30.64%
concat-source: sourceAndMap() 23 ms 19.6 ms +17.44%
helpers/createMappingsSerializer: lines-only serializer 2.8 ms 2.5 ms +11.66%
helpers/createMappingsSerializer: full serializer 4.5 ms 3.8 ms +18.53%
helpers/splitIntoLines: big source 10.9 ms 4.8 ms ×2.3
helpers/splitIntoLines: empty 326.9 µs 88.3 µs ×3.7
helpers/splitIntoLines: fixture 41.2 ms 23.9 ms +72.63%
helpers/splitIntoLines: long lines 425.9 ms 2 ms ×210
original-source: map({columns:false}) 7.1 ms 4 ms +78.67%
original-source: sourceAndMap({columns:false}) 7.1 ms 4 ms +77.44%
original-source: sourceAndMap() 20.4 ms 17 ms +20.03%
original-source: map() 20.2 ms 17 ms +19.32%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing fix-perf (3a5fb5d) with main (5a07869)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant