Repository navigation
feat: experimental.nativeMagicString - #9
Closed
IWANABETHATGUY wants to merge 2 commits into
Closed
IWANABETHATGUY wants to merge 2 commits into
IWANABETHATGUY wants to merge 2 commits into
Conversation
feat: 🎸 update chore: 🤖 update chore: 🤖 update
IWANABETHATGUY
force-pushed
the
background-sourcemap-gen
branch
from
October 5, 2025 17:13
fcb7329 to
6097d49
Compare
experimental.nativeMagicString
hyfdev
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Nov 20, 2026
…tring` (#11107) `getCombinedSourcemap` left out the maps of earlier transform hooks that returned a native MagicString when `experimental.nativeMagicString` and sourcemaps were enabled, because those maps were only added to the sourcemap chain after the scan stage. When a hook calls `getCombinedSourcemap`, the earlier hooks' maps are now generated on the JS thread instead of in the background, which is still no more work than without `nativeMagicString`. <details> <summary>Benchmarks</summary> Release builds of this PR vs its parent (a745574) on an Apple M3 Pro. Each cell is the median build time of 30 (threejs10x) or 15 (apps) runs, alternating the two builds in random order, with a 95% bootstrap interval for the change. The bundles and sourcemaps are byte-identical between the two builds. threejs10x, `sourcemap: true`: | Scenario | parent | PR | Change | | --- | --- | --- | --- | | no plugins | 551 ms | 552 ms | +0.2% (-0.7 to +1.1) | | `nativeMagicString`, 1 MagicString plugin | 575 ms | 572 ms | -0.6% (-1.0 to -0.1) | | `nativeMagicString`, 3 MagicString plugins | 591 ms | 586 ms | -0.9% (-1.5 to +0.2) | | `nativeMagicString`, 1 plugin + `getCombinedSourcemap` in every module | 583 ms | 578 ms | -0.9% (-1.6 to -0.3) | | flag off, 1 plugin | 576 ms | 573 ms | -0.5% (-0.9 to +0.2) | | flag off, 1 plugin + `getCombinedSourcemap` in every module | 584 ms | 588 ms | +0.6% (-0.1 to +1.2) | The apps and plugins of rolldown/benchmarks#9, with `nativeMagicString` set explicitly: | App | Scenario | parent | PR | Change | | --- | --- | --- | --- | --- | | 5000 | `oxc+magicString` | 1510 ms | 1505 ms | -0.3% (-0.9 to +0.9) | | 5000 | `oxc+nativeMagicString` | 1569 ms | 1539 ms | -1.9% (-5.1 to -0.6) | | 10000 | `oxc+magicString` | 3105 ms | 3108 ms | +0.1% (-0.8 to +0.6) | | 10000 | `oxc+nativeMagicString` | 3128 ms | 3124 ms | -0.1% (-0.6 to +0.1) | </details> close #9459
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.