Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Change forEach to forEachLimit and purge cache to fix memory consumption issues #8609
I did some memory profiling on a large app to find the issue. The app was crashing with memory usage of around 1.4GB.
The timelines are only from the "additional chunk assets processing (91%)" stage plus or minus some time. As a note, the profiling slows down the process considerably and I started the profiling manually close to the crash, so don't pay much attention to the lengths of time shown in the timelines.
Before applying this PR
Note that it allocates 550MB all at once (this is not the heap usage, only inside the profiling scope)
When applying the
referenced this pull request
Jan 16, 2019
I can't easily take this change, as it would be a breaking change. While it probably improves memory/performance for you, it could affect other plugin negatively. Plugins could access the
We need to put this behind an opt-in flag and enable it by default in the next major.
Instead of removing the