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
DRILL-7372: MethodAnalyzer consumes too much memory #1887
Conversation
5154c99
to
dbf5680
Compare
|
||
@Override | ||
public void clearStack() { | ||
super.clearStack(); |
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.
Consider nullification or empty collections re-assignement
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.
Thanks, done.
dbf5680
to
01b3e19
Compare
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.
@arina-ielchiieva, thanks for the review, I have addressed your comment.
|
||
@Override | ||
public void clearStack() { | ||
super.clearStack(); |
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.
Thanks, done.
+1, LGTM. |
Just a thought: we proved a couple of years back that the modern JVM does a perfectly fine job of scalar replacement. We also found performance benefits from using "plain Java" without class merging. As a result, our byte code analysis is no longer needed. Just flip one option and we can completely remove this code instead of continuing to maintain it. |
@paul-rogers, unfortunately, I didn't see the results of these performance measurements, but I believe that there are some corner cases where our byte code analysis will bring some benefit, for example, when the generated method is too large for JVM optimizations and general time for query execution is much larger compared to the time required for producing scalar replacement and classes merging. |
Jira: DRILL-7372.
Set<Integer>
withBitSet
- it allowed to reduce heap usage significantly.localVariablesSet
andlabelsStack
from the source frame when a new frame is created since the branch-sensitive analysis was already done for a source frame.