-
Notifications
You must be signed in to change notification settings - Fork 17
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
Reduce memory footprint of pass 1 heapdump loading #32
Comments
By Jason Koch on Feb 19, 2021 04:11 Created attachment 285606 :notepad_spiral: 571331_pass1_heap.patch |
By Andrew Johnson on Feb 19, 2021 11:20 Thanks for the contribution.
|
By Jason Koch on Mar 25, 2021 11:02 Andrew, this is a lead-in to some follow-up changes; the goal being that we can likely eliminate the pass1 static footprint requirement at initial parse time. The second chunk is allowing pass1 parsing to be shifted to disk before starting pass2. Net outcome is a reduction of the fixed pass1 memory requirements during parsing. The main challenge is doing it without breaking the API. I'm happy to withdraw this, I think there's probably a better way to tackle it by deferring to some alternative IO model. This would be something like writing directly through to disk for some of the Array* models but this needs to be balanced against IO costs. I've yet to really think about this in detail but it seems like this would allow for significantly reduced parsing memory requirements. |
By Andrew Johnson on May 13, 2022 08:54 I made a basic change to address some of this problem: I notice that the class library for Java 17 for Arrays.parallelSort() makes If the heap space for Identifier index is still a problem in pass 1 then we can look at this patch again. |
| --- | --- |
| Bugzilla Link | 571331 |
| Status | NEW |
| Importance | P3 enhancement |
| Reported | Feb 19, 2021 03:58 EDT |
| Modified | May 13, 2022 08:54 EDT |
| Version | 1.11 |
| Reporter | Jason Koch |
Description
The Identifier index created during Pass 1 parsing currently uses a single linear array, and grows as required by allocating arrays at 1.5x and copying all values. A consequence of this is that, for a given memory footprint (eg: 1GB + one object), the required parsing space is (1 + 1*1.5 =) 2.5GB of heap.
Instead of growing by 1.5x, it would use less memory during Pass 1 parsing if memory was allocated and extended as needed, with no copying to an extended array.
The text was updated successfully, but these errors were encountered: