-
Notifications
You must be signed in to change notification settings - Fork 10
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 requirements of running tool #163
Labels
type/feat
Suggests new features.
Comments
The main culprit seems to be how we read the Bazel profile. We read the whole profile as a JsonObject. Instead, we should consider reading it in a stream. |
saraadams
added a commit
that referenced
this issue
Dec 20, 2023
When reading the profile, many strings are encountered multiple times. Use `String.interner()` to reduce the memory requirements of running the analyzer. Benchmark with a Bazel profile of unzipped size 357MB Using YourKit as a profiler and checking the shallow size just before generating the suggestions: Before: 692 MB After: 349 MB Progress on #163 Signed-off-by: Sara Adams <[email protected]>
saraadams
added a commit
that referenced
this issue
Dec 21, 2023
Instead of reading the Bazel profile all at once, use a stream to reduce memory consumption. Benchmark with a Bazel profile of unzipped size 357MB Using YourKit as a profiler and checking the shallow size at the end of the `BazelProfile` constructor: Before: 3.6 GB After: 349 MB Contributes to #163 Signed-off-by: Sara Adams <[email protected]>
saraadams
added a commit
that referenced
this issue
Dec 21, 2023
Instead of reading the Bazel profile all at once, use a stream to reduce memory consumption. Benchmark with a Bazel profile of unzipped size 357MB Using YourKit as a profiler and checking the shallow size at the end of the `BazelProfile` constructor: Before: 3.6 GB After: 349 MB Contributes to #163 --------- Signed-off-by: Sara Adams <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Especially when analyzing larger Bazel profiles, the tool requires a lot of memory. This may lead to OOMs.
Preferred solution
Investigate what consumes the most memory and look into implementing it more performantly.
Additional information
When analyzing a Bazel profile that is gzipped 34 MB and unzipped 35 MB, running the analyzer consumed about 4 GB.
The text was updated successfully, but these errors were encountered: