Skip to content

Commit cc7aca6

Browse files
alexander-akaitclaude
authored andcommitted
perf(javascript): build tighten_body's steps once, not per call
tightenBody declared its seven steps inside itself, sharing `changed` and the scope with them, so every call built them again, 54,503 times per minify of typescript.js, with the closures some of them built per statement on top. The steps are now module-level functions handed one state object per nesting depth, and their inner closures take what they read as arguments. Also carries #22521's fit of two printer tests and of OXC_SMALLER to main (`vercel/ms` back on, `side_effects_cascade_3` off), which fail on main and gate the integration jobs.
1 parent a42343f commit cc7aca6

3 files changed

Lines changed: 917 additions & 650 deletions

File tree

0 commit comments

Comments
 (0)