Skip to content

Conversation

@avivkeller
Copy link
Member

@avivkeller avivkeller commented Aug 11, 2025

Hiya! @ovflowd mentioned to me that y'all are looking to speed up parts of Webpack. That's great, and I'm happy to help. Anyhow, I wanted to help, so I figured I'd start by looking at the benchmarks, and immediately noticed a few things I could improve: Benchmarks don't profile

What kind of change does this PR introduce?

Refactoring

Did you add tests for your changes?

The tests are the benchmarks

Does this PR introduce a breaking change?

I certainly hope not.

What needs to be documented once your changes are merged?

The documentation has already been updated

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 11, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@avivkeller avivkeller force-pushed the benchmark-changes branch 2 times, most recently from 273b1e7 to 1407aea Compare August 11, 2025 20:55
@avivkeller avivkeller marked this pull request as ready for review August 11, 2025 20:57
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Let's do changes step by step, otherwise diff are dirty and hard to read and understand

  1. Let's keep benchmarks in test directory right (we can move them at the last step)
  2. We keep generated code in ./test/js/<name>, so let's store generated code there (we want to rename this directory to test/outputs/<name> soon)
  3. Let's add profiling and other feature to BenchmarkTestCases.benchmark.mjs (and not only) in other PR, because I can't see diff due to moving files to other directory and it is hard to understand what we changed

@avivkeller
Copy link
Member Author

avivkeller commented Aug 11, 2025

Sorry! Indeed, I'll simplify this to only add profiling support and such

@alexander-akait
Copy link
Member

Also we are trying to using jest-worker to speedup our benchmarks - #19780 make sense to look at this later

@avivkeller avivkeller changed the title feat(benchmark): rewrite feat(benchmark): support profiling Aug 11, 2025
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Looks good

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 11, 2025

CodSpeed Performance Report

Merging #19789 will degrade performances by 75.03%

Comparing avivkeller:benchmark-changes (f7858a5) with main (1887f2c)

Summary

❌ 2 regressions
✅ 40 untouched benchmarks

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

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "devtool-eval-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 70.3 ms 116.5 ms -39.64%
benchmark "many-chunks-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 29.3 ms 117.4 ms -75.03%

@alexander-akait
Copy link
Member

@avivkeller As you can see, our watch tests are not stable (not related to your changes), if you have time to look at what's wrong with them will be great

@alexander-akait alexander-akait merged commit 8b373fe into webpack:main Aug 11, 2025
42 of 44 checks passed
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.

2 participants