next.js
21cae09d - Turbopack: lazily create syntax contexts for scope hoisting (#81193)

Commit
222 days ago
Turbopack: lazily create syntax contexts for scope hoisting (#81193) Previously, if 10k modules are merged together, it would create 10k syntax context for each of the 10k modules. That involves a TLS and a `Mutex`. Most of these are never used, so instead create the contexts lazily with some interior mutability. Now this step doesn't show up in the trace at all anymore (in one case, cutting build time from 10s to 5s) https://vercel.slack.com/archives/C06PPGZ0FD3/p1751475796580989?thread_ts=1751302539.808369&cid=C06PPGZ0FD3
Author
Parents
Loading