Skip to content

Commit 79aa5df

Browse files
perf(javascript): build tighten_body's steps once, not per call (#22512)
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 0aec6c4 commit 79aa5df

2 files changed

Lines changed: 912 additions & 646 deletions

File tree

0 commit comments

Comments
 (0)