next.js
49b4331e - Reduce memory/cache overhead from over loader processing (#62005)

Commit
2 years ago
Reduce memory/cache overhead from over loader processing (#62005) In `v14.0.2-canary.1` users started noticing more memory errors especially with many edge runtime configured pages. After investigation it seems this can be related to the additional transpiling we configured in https://github.com/vercel/next.js/pull/59569 and https://github.com/vercel/next.js/pull/57784 To help alleviate this we are updating the default swc loader to have an additional check to see if no special features such as `next/font`, `next/dynamic`, or `use server/client` directives are present and then no-oping in the loader to avoid additional overhead for a majority of modules. For monitoring regressions our `stats-app` has been updated with repeated edge-ssr routes to hopefully help us keep an eye on memory or cache size issues. x-ref: NEXT-2430 x-ref: NEXT-2395 x-ref: NEXT-2299 x-ref: NEXT-2324 x-ref: NEXT-2373 Closes NEXT-2479
Author
Parents
Loading