-
Notifications
You must be signed in to change notification settings - Fork 753
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 DefaultObservabilitySymbolCollector
object memory
#41078
Reduce DefaultObservabilitySymbolCollector
object memory
#41078
Conversation
DefaultObservabilitySymbolCollector
object memory
Shall we remove the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #41078 +/- ##
============================================
- Coverage 80.79% 76.82% -3.97%
+ Complexity 77993 53465 -24528
============================================
Files 3414 2881 -533
Lines 275030 201542 -73488
Branches 49786 26654 -23132
============================================
- Hits 222210 154837 -67373
+ Misses 43793 38247 -5546
+ Partials 9027 8458 -569 ☔ View full report in Codecov by Sentry. |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
Addressed the suggestions |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
Closed PR due to inactivity for more than 18 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
8ac9786
into
ballerina-platform:master
Purpose
Fix OOM issue occurred in choreo-cp-graphql.
Fixes https://github.com/wso2-enterprise/internal-support-ballerina/issues/273
Approach
When observability is enabled,
DefaultObservabilitySymbolCollector
static object is created which has a memory of~400MB
in the issue mentioned above. It contains all metadata of modules and their documents in the package including syntax trees of each document. It has only been used inGenerating Executable
stage in compilation to create<module-name>-observability-symbols.jar
which containssyntax-tree.json
. To createsyntax-tree.json
, a syntax tree data string has been created which also contains a memory of~180MB
.In this approach, instead of storing metadata of all modules and documents, those data has been used directly to create syntax tree data string and it has been stored in the
PackageHolder
where the module data has been stored previously. This method reduces the memory ofDefaultObservabilitySymbolCollector
static object from~400MB
to~180MB
and additionally syntax tree data string is not needed to be created at theGenerating Executable
stage.Samples
Remarks
Check List