Skip to content

Add SourceMap Benchmark #58125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miguelmarcondesf
Copy link
Contributor

@miguelmarcondesf miguelmarcondesf commented May 2, 2025

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

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/performance
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label May 2, 2025
@miguelmarcondesf miguelmarcondesf force-pushed the performance-improvements-sourcemap branch from 5e438af to 4147ff3 Compare May 2, 2025 20:07
@miguelmarcondesf miguelmarcondesf changed the title Performance improvements sourcemap Add SourceMap Benchmark May 2, 2025
@miguelmarcondesf
Copy link
Contributor Author

Local running with n: 1e5 for all cases:

image

@miguelmarcondesf miguelmarcondesf marked this pull request as ready for review May 3, 2025 21:12
@anonrig
Copy link
Member

anonrig commented May 3, 2025

You need to add a test for these benchmarks. You can find similar ones in test folder.

@miguelmarcondesf
Copy link
Contributor Author

You need to add a test for these benchmarks. You can find similar ones in test folder.

Thank you, just pushed that!

@miguelmarcondesf miguelmarcondesf force-pushed the performance-improvements-sourcemap branch from 5749fce to bc9fbe9 Compare May 6, 2025 16:42
Copy link

codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.12%. Comparing base (f2e99c5) to head (ac7a40e).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58125      +/-   ##
==========================================
+ Coverage   90.02%   90.12%   +0.09%     
==========================================
  Files         639      640       +1     
  Lines      188173   188294     +121     
  Branches    36831    36927      +96     
==========================================
+ Hits       169404   169701     +297     
+ Misses      11509    11317     -192     
- Partials     7260     7276      +16     

see 52 files with indirect coverage changes

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

@geeksilva97 geeksilva97 requested a review from H4ad May 20, 2025 14:16
@miguelmarcondesf miguelmarcondesf force-pushed the performance-improvements-sourcemap branch 2 times, most recently from f1040cd to 421ae12 Compare June 5, 2025 18:55
Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

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

Thank you for the change! Overall LGTM % nits.

@miguelmarcondesf miguelmarcondesf force-pushed the performance-improvements-sourcemap branch from 02b5acc to 7eab302 Compare June 18, 2025 23:50
@legendecas legendecas added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 20, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 20, 2025
@nodejs-github-bot
Copy link
Collaborator

@miguelmarcondesf miguelmarcondesf force-pushed the performance-improvements-sourcemap branch from c7232d1 to ac7a40e Compare June 20, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants