Avatar for the swc-project user
swc-project
swc
BlogDocsChangelog

Performance History

Latest Results

fix(swc): drop spans of cached `globals` values `GlobalPassOption::build` parses each `jsc.transform.optimizer.globals.vars` value into an anonymous file of the `SourceMap` it is handed, and memoizes the parsed expression in a process-wide cache. A span is only meaningful to the `SourceMap` that produced it, so the cache outlives what its contents point at, and the emitted source map ends up depending on three things that should not affect it: whether the call hit the cache, the order the host passed the defines in (the cache key is order sensitive), and which file was compiled first in the process (the cached position is derived from its size). Drop the spans before the value is cached. Parsing still happens in the caller's `SourceMap`, so a syntax error in a define value keeps its position, but nothing `SourceMap` dependent survives into the cache. Substituted values now carry `DUMMY_SP`, which codegen skips, so no mapping is emitted for them on any call.
upupming:fix/inline-globals-span
1 hour ago
test(parser): remove codegen dev dependency
trueadm:codex/tsrx-parser
1 day ago
chore: Add changeset
trueadm:codex/tsrx-parser
1 day ago
fix
Austaras:main
2 days ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(swc): drop spans of cached `globals` values#12129
1 hour ago
d1af188
upupming:fix/inline-globals-span
CodSpeed Performance Gauge
0%
1 day ago
187e9ad
trueadm:codex/tsrx-parser
CodSpeed Performance Gauge
0%
fix(es/minifier): Preserve for init#12121
2 days ago
4eeac46
Austaras:main
© 2026 CodSpeed Technology
Home Terms Privacy Docs