Add SourceMap Benchmark
Add SourceMap Benchmark
This PR introduces a new benchmark suite for the lib/internal/source_map module to help evaluate and explore the performance characteristics of the SourceMap.
I'm still learning how everything fits together, but this is a first step toward understanding where small improvements could improve performance.
cc @BridgeAR
Review requested:
- [ ] @nodejs/performance
- [ ] @nodejs/tsc
Local running with n: 1e5 for all cases:
You need to add a test for these benchmarks. You can find similar ones in test folder.
You need to add a test for these benchmarks. You can find similar ones in test folder.
Thank you, just pushed that!
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.09%. Comparing base (
04cb572) to head (c071304). Report is 93 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #58125 +/- ##
==========================================
+ Coverage 90.07% 90.09% +0.02%
==========================================
Files 640 640
Lines 188262 188262
Branches 36912 36911 -1
==========================================
+ Hits 169580 169623 +43
+ Misses 11399 11363 -36
+ Partials 7283 7276 -7
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
CI: https://ci.nodejs.org/job/node-test-pull-request/67569/
CI: https://ci.nodejs.org/job/node-test-pull-request/67620/
Commit Queue failed
- Loading data for nodejs/node/pull/58125 ✔ Done loading data for nodejs/node/pull/58125 ----------------------------------- PR info ------------------------------------ Title Add SourceMap Benchmark (#58125) Author Miguel Marcondes Filho <[email protected]> (@miguelmarcondesf) Branch miguelmarcondesf:performance-improvements-sourcemap -> nodejs:main Labels author ready, needs-ci, commit-queue-squash Commits 3 - benchmark: add source map and source map cache - benchmark: use fixtures for sourcemap cache - benchmark: use fixtures and avoid dead code for sourcemap Committers 1 - Miguel Marcondes <[email protected]> PR-URL: https://github.com/nodejs/node/pull/58125 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/58125 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Edy Silva <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 02 May 2025 17:48:50 GMT ✔ Approvals: 4 ✔ - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/58125#pullrequestreview-2946108239 ✔ - Edy Silva (@geeksilva97): https://github.com/nodejs/node/pull/58125#pullrequestreview-2950130654 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/58125#pullrequestreview-2952013937 ✔ - Rafael Gonzaga (@RafaelGSS) (TSC): https://github.com/nodejs/node/pull/58125#pullrequestreview-2975274650 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-06-23T13:44:33Z: https://ci.nodejs.org/job/node-test-pull-request/67620/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - benchmark: add source map and source map cache ⚠ - benchmark: use fixtures for sourcemap cache ⚠ - benchmark: use fixtures and avoid dead code for sourcemap - Querying data for job/node-test-pull-request/67620/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/15999945215
CI: https://ci.nodejs.org/job/node-test-pull-request/67778/
CI: https://ci.nodejs.org/job/node-test-pull-request/67813/
CI: https://ci.nodejs.org/job/node-test-pull-request/67843/
CI: https://ci.nodejs.org/job/node-test-pull-request/67863/
CI: https://ci.nodejs.org/job/node-test-pull-request/67870/
Landed in 9c025a9287073ca616060b49c10ff6ca56c2358f