Allow disabling server source maps locally #62198
alex-statsig
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
hey @alex-statsig have you found any ways to fix this? I'm experiencing the same thing locally. My heap snapshot has up to 200mb in just the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Reduce high memory overhead in development when server modules are repeatedly recompiled (for no real reason, see #45204) and held in memory
Non-Goals
No response
Background
I've observed during memory profiling that many duplicated copies of source maps appear in memory profiler. In my case, the memory held for a single API route is 60MB. This is duplicated multiple times as the API route is recompiled in development, per API route, leading to an eventual OOM not long after.
Proposal
There could be a next.config option to disable the maps.
Additionally I've tried manually setting webpack.devtool and got "Warning: Reverting webpack devtool to 'eval-source-map'. Changing the webpack devtool in development mode will cause severe performance regressions.".
Beta Was this translation helpful? Give feedback.
All reactions