Skip to content

Commit 469acc6

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 the `vercel/ms` entry in OXC_SMALLER to #22473 and #22499 together, which fail on main and gate the integration jobs.
1 parent 683b7a1 commit 469acc6

3 files changed

Lines changed: 916 additions & 648 deletions

File tree

0 commit comments

Comments
 (0)