-
Notifications
You must be signed in to change notification settings - Fork 416
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
Memory consumption #1331
Memory consumption #1331
Conversation
🦋 Changeset detectedLatest commit: 21183fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Do you need any logs from a failing build (heap out of memory)? |
@PierreGUI thank you, but I don't need it now. I'll finish cache optimisation tomorrow, and then we will see what to do. |
@PierreGUI @layershifter I hope, it's ready for testing. |
Hey @Anber thanks! I tried to build and got this error: |
@PierreGUI, let's try two things:
In the second case, I don't need a log itself — just the size of it. You can forward it to a file with something like |
@PierreGUI Have you tried to increase the memory limit? https://geekflare.com/fix-javascript-heap-out-of-memory-error/ I'm still not sure if it is a general problem with memory consumption or some infinite loop inside the processing. If increasing won't help, then it's an infinite loop somewhere, and it's kind of good news. |
Hey @Anber,
So the hypothesis of an infinite loops grows stronger 🤔 |
@PierreGUI have you tried with the last version? We have found and fixed one infinity loop yesterday. |
I see that you tried with the old version. @layershifter had the same StackOfMaps errors but with the last version everything is ok, however for such amount of modules it may require around 8Gb heap size. I will try to figure out how to reduce memory consumption, possibly at the expense of performance. |
Ehm, I pulled this branch's HEAD, ... and then forgot to |
Using the latest version: I build with only one webpack entry point (previously 2, out of 15 total). Although the build goes through for some entrypoint, this one entrypoint still throws an out of memory error.
|
Looks like we have the new champion by the size of the codebase :) Anyway, the challenge accepted. |
At that point, I've done everything possible. The next step is to improve the debug experience so it will be easy to understand what should be fixed next. |
I've tried this version and for my largest entrypoint status remains the same: the build gets stuck at some point (early 10% webpack progress), then it slowly grows in memory (I've tried up to 16gB) until it reaches the limit and blows up. In the meantime no new progress is displayed. |
@PierreGUI I'm going to add more debug info, and then we will try to figure out what happens in your project. |
Ok thanks 👍 |
Hi @PierreGUI! Have you checked the last published version? |
Amazing work! Thanks. The build no longer crashes and seems quite fast. There are a bunch of errors now, mostly types, I'll have a look and report them if necessary |
Motivation
Memory management is far from optimal. Let's fix it.
Summary
How it started
With enabled Linaria:
With disabled Linaria:
How it ended