-
Notifications
You must be signed in to change notification settings - Fork 736
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
OOM when we try to compile module with 1000 classes #32204
Comments
Workaround: pass |
This will be a blocker if someone needs observability too. |
This is most probably happening due to the JSON canonicalizer added to make the ST JSON deterministic during compilation a deterministic JSON (if the same code is compiled multiple times, the JSON needs to be the same). Without the canonicalizer, this used to change due to usages of data structures such as HashMaps, HashSets, within the compiler, which doesn't gaurantee any ordering of the elements inserted into them. While we have optimized this process as much as possible, the only remaining improvement for this would be to ensure that the compilation logic is deterministic. We would not be able to fix this completely without ensuring the above. |
The Java class added for JSON canonicalization uses a StringBuilder to create the canonicalized (standardize) JSON from the input JSON data. If the input string is extremely large, it may consume a large amount of memory and may result in OOM error. Additionally the |
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description:
I have a module with 1000 class definitions as below.
Getting OOM when try to compile the program.
The text was updated successfully, but these errors were encountered: