You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
continuationMarksStack formats a stack at module load even when Error.stackTraceLimit is 0 #8936
It runs even when Error.stackTraceLimit is 0. The other load-time probe in Utils.ts is guarded (getStackTraceLimit() !== 0 && ...), and #8114 added the same guard to the Effect.fn / span / layer capture sites, but this one was missed. Still the case in 4.0.2.
Why it matters on Cloudflare Workers: with upload_source_maps enabled, the first time an isolate formats a stack it loads the source map. For us that is a ~36 MB map, and doing it inside module evaluation costs about 150 ms of startup CPU. Our chat worker went from 176 ms (before adopting Effect 4) to 339–430 ms, measured with wrangler versions upload. With Error.stackTraceLimit = 0 set around module load plus this one-line change, it is back to 177 ms. Setting the limit alone is not enough because the probe formats the stack regardless (376 ms). wrangler check startup doesn't show it because the local runtime doesn't load the map.
Activity