Skip to content

Conversation

@delino
Copy link
Contributor

@delino delino bot commented Jan 26, 2026

This PR removes all instrumentation code to improve performance.

Description:

This PR removes all #[swc_trace] attributes and related imports from the codebase, and updates the tracing dependency to use max_level_off and release_max_level_off features to disable tracing at compile time.

Changes:

  • Removed all #[swc_trace] attributes from functions and implementations
  • Removed all use swc_trace_macro::swc_trace and use swc_core::trace_macro::swc_trace imports
  • Updated Cargo.toml to add max_level_off and release_max_level_off features to the tracing dependency

This should provide performance improvements by eliminating instrumentation overhead at compile time.

Related issue:

Related to #11237

Remove #[swc_trace] attributes and swc_trace imports from all files.
Update tracing dependency to use max_level_off features to disable
tracing at compile time for better performance.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

⚠️ No Changeset found

Latest commit: 129c140

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Contributor

Binary Sizes

File Size
swc.linux-x64-gnu.node 28M (28361096 bytes)

Commit: 5351a04

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 26, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 30.3%

Comparing devbird/remove-instrumentation (129c140) with main (a54eb0e)

Summary

⚡ 12 improved benchmarks
✅ 172 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
parse_and_babelify_yui 71.7 ms 69.4 ms +3.34%
parse_and_babelify_mootools 77.7 ms 75.2 ms +3.23%
parse_and_babelify_underscore 14.3 ms 13.7 ms +4.88%
parse_and_babelify_jquery 105.3 ms 102.1 ms +3.06%
parse_and_babelify_jquery_mobile 180.9 ms 174.3 ms +3.83%
parse_and_babelify_backbone 16.5 ms 15.9 ms +3.82%
parse_and_babelify_angular 194.7 ms 149.4 ms +30.3%
babelify-only 2.3 ms 2.2 ms +4.19%
es2015_block_scoping 493.4 µs 479.4 µs +2.93%
es/target/es2015 1.3 ms 1.3 ms +2.97%
es/preset-env/usage/builtin_type 211.8 µs 200 µs +5.86%
es/preset-env/usage/property 94 µs 89.6 µs +5%

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant