-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a large code base runs out of memory #4795
Comments
Parcel 1 didn't do scope hoisting by default, Parcel 2 does... |
Builds successfully for me, peak memory was about 2,5gb
😬
These aren't processes but threads, so |
That's strange. It always crashes with
Here's what happens when I try
|
I was able to get it to work if I change this line in - v => !/^--(debug|inspect)/.test(v),
+ v => !/^--(debug|inspect|max-old-space-size=)/.test(v), |
@mischnic Would you accept a PR to fix this? It's just a one-line change, so I'm happy to make a PR if it'd be helpful. |
Sure 👍 |
Closing this because the PR with the workaround has landed. |
🐛 bug report
Now that Parcel 2 is out of alpha, I thought I'd try adding it to esbuild's bundler performance benchmarks. However, Parcel 2 currently fails to build both of the benchmarks. This issue is about the JavaScript benchmark.
🎛 Configuration (.babelrc, package.json, cli command)
Here is how to reproduce the issue:
🤔 Expected Behavior
I expected Parcel 2 to be able to build my JavaScript benchmark. Parcel 1 can build the benchmark fine.
While the benchmark is a stress test for bundlers, it should also be somewhat representative of a real-world code base. The benchmark consists of ten copies of the Three.js library because that is roughly the size of Figma's frontend JavaScript code base. I haven't tried running Parcel 2 on Figma's frontend code.
😯 Current Behavior
Parcel 2 starts building for a while, but then starts generating errors that look like this:
💁 Possible Solution
I haven't investigated why this happens. Since Parcel 1 is able to build this fine, it's possible that this is due to an issue with Parcel 2 using too much memory, and the best fix is to fix the high memory usage.
The usual way to work around problems like this is to pass
--max-old-space-size
to node. However, I couldn't do this easily because the processes running out of memory are child worker processes, and there doesn't appear to be a configuration option for Parcel 2 to increase the memory limit for child worker processes.🌍 Your Environment
The text was updated successfully, but these errors were encountered: