perf: optimize Groovy-based LAL DSL with static compilation#7263
perf: optimize Groovy-based LAL DSL with static compilation#7263kezhenxu94 merged 1 commit intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7263 +/- ##
============================================
- Coverage 53.81% 51.01% -2.80%
+ Complexity 4349 4050 -299
============================================
Files 1899 1904 +5
Lines 40950 41139 +189
Branches 4595 4583 -12
============================================
- Hits 22038 20988 -1050
- Misses 17822 19022 +1200
- Partials 1090 1129 +39
Continue to review full report at Codecov.
|
|
Please fix CI. And serialization has more performance impact for groovy, right? |
|
Comparing 385k to 246k, we have a 50% performance increment, is this running in one Mac Intel core? Could you attach the hardware standard here? |
Yes. Whenever a new LAL DSL script is created, we can compile it to Java-style static byte codes once, after that its execution performance is close to Java.
Yes, they were benchmarked in a single thread on my Mac. |
Then my next question would be, if we use this as debug tool? Whether could cause metaspace oom? Or we need to set up previous dymanic engine for debug tool. |
In terms of dynamic update LAL / MAL and debugging tool for LAL, we can discuss in their corresponding issues because metaspace OOM may also exist before this PR, it's due to Groovy Shell's compilation and references to some class loaders, etc., when we want to dynamically update LAL / MAL and debug them in UI, we should consider this then. |
Groovy naturally supports many dynamic features that we don't benefit for now but cost performance loss, in this patch we compile our Groovy-based DSL scripts statically to optimize performance.
FYI @dmsolr This change should have a very clear impact for your update feature. Please recheck at your sides, especially whether update cause memory leak(because of new classes generated). |
wu-sheng
left a comment
There was a problem hiding this comment.
LGTM. Once all tests passed, I am good.
Groovy naturally supports many dynamic features that we don't benefit for now but cost performance loss, in this patch we compile our Groovy-based DSL scripts statically to optimize performance.
Improve the performance of LAL
The benchmark result.
Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #. Not close, related to Improve LAL performance #7180
Update the
CHANGESlog.