-
Notifications
You must be signed in to change notification settings - Fork 758
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
[Bug]: When opening Ballerina projects with large ballerina files the VS Code plugin crashes #43104
Comments
Related to #42612 |
In addition to the above when I import the |
When divide the I can see the following error notification in VS Code. [1] - ballerina-platform/module-ballerinax-stripe#4 |
@KavinduZoysa currently I am blocked in this issue and unable to resolve this [1] internal support ticket. Do we have any progress on this or do you guys have a workaround ? [1] - https://github.com/wso2-enterprise/internal-support-ballerina/issues/719 |
@ayeshLK, still we are trying to find the root cause for this issue. Sometimes we see a GSON array with the size of 300MB-500MB and sometimes, we observe the heap is mostly allocated for the project context. Currently, we are investigating both aspects to find the exact root cause. We will update on the progress. As a workaround, we can divide the |
In addition to what @KavinduZoysa has mentioned, we increased the memory to 2GB, and we didn't encounter the crash anymore. |
I tried importing the Stripe module after building it locally and did not encounter any OOM issues. We are still investigating the OOM issue with large files and will provide updates on our progress. |
When we analysed the heap dump, we identified an ArrayList with 2,927 elements (matching the number of types in the After examining the JsonObjects, we observed that they contained key value pairs representing the syntax tree, as shown in the below image. After debugging the code, we discovered that these JsonObjects were created in the It appears that the Diagram.util class represents every token with a JsonObject. @kanushka @hevayo |
This JSON syntax tree is used to generate the Ballerina low-code diagram. I think we can deprecate this generation since the new Ballerina extension will use another LS API to generate the low-code diagram. |
I'm sorry, we cannot deprecate this generation since we are using this functionality in a few more places. The initial language service shutdown issue will occur due to code lens generation logic. Ballerina extension uses the If we can come up with a new API to handle the code lens requirement, we will be able to remove the initial call to the However, we still need the syntax tree to work with the data mapper, service designer, and statement editor. |
Description
Following error log was found in the VS Code logs:
Following heapdump was found in the project [1]
[1] - https://drive.google.com/file/d/18dKWEe9Yzu63VqpplLQK-aH1lf102Lcp/view?usp=sharing
Steps to Reproduce
Try opening the
client.bal
in the following project using VS Code.stripe_new.zip
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: