chore: remove unconditioned instrument code
To check if tracing has a performance cost
Description:
BREAKING CHANGE:
Related issue (if exists):
⚠️ No Changeset found
Latest commit: 182dc3a2b0cead0f28f62aa6741728dc606c96a7
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.
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
It has a noticeable cost. You can try enabling tracing/max_level_off
CodSpeed Performance Report
Merging #11237 will not alter performance
Comparing stormslowly:chore/try_no_instrument (182dc3a) with main (d93ec90)
Summary
✅ 138 untouched
In rspack-resolver, when I enable max_level_off and release_max_level_off, I still get 2~15% performance loss in benchmark.
Binary Sizes
| File | Size |
|---|---|
swc.linux-x64-gnu.node |
31M (31818120 bytes) |
Commit: f4fda6e6a3192d6c4dd39971b49bf24d36f45538
I think it's a good idea to remove all tracing code, considering the perf difference
According to codspeed's report, the most improved step is enabling max_level_off.
That's quite different from rspack-resolver's case.
I will do some digging to find the season and figure out a way to improve performance and keep trackability.
Review the following changes in direct dependencies. Learn more about Socket for GitHub.