[Improvement]: Improve EnvironmentPackageCache to Cache Only Required Data #40398
Labels
Area/ProjectAPI
needTriage
The issue has to be inspected and labeled manually
Priority/Blocker
Type/Improvement
userCategory/Compilation
Milestone
Description
Currently, all the data, including syntax trees and documents, is cached in the project API for later use. However, when dealing with a large dependency tree, this can result in out-of-memory errors (OOM). Initially, these data are cached to be used by LS and other tools. However, it has been observed that LS does not utilize this cache and instead relies on the Compiler API to derive the required information. Even the resolution of 'Go to Definition' is handled differently. After discussions with @azinneera and @IMS94, we concluded that it would be worth exploring the possibility of cleaning up unnecessary data once the BIR is generated.
Here is a heap dump generated for the following Ballerina program.
Describe your problem(s)
No response
Describe your solution(s)
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: