arina-ielchiieva commented on a change in pull request #1887: DRILL-7372:
MethodAnalyzer consumes too much memory
URL: https://github.com/apache/drill/pull/1887#discussion_r341099170
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/compile/bytecode/MethodAnalyzer.java
##########
@@ -174,14 +171,22 @@ public void initJumpTarget(int opcode, LabelNode target)
{
case IF_ICMPLE:
case IF_ACMPEQ:
case IF_ACMPNE:
+ case IFNULL:
case IFNONNULL:
// for the case when conditional block is handled, creates new
variables set
// to store local variables declared inside current conditional
block and
// stores its target LabelNode to restore previous variables set
after conditional block is ended
- localVariablesSet.push(new HashSet<>());
+ localVariablesSet.push(new BitSet());
labelsStack.push(target);
}
}
}
+
+ @Override
+ public void clearStack() {
+ super.clearStack();
Review comment:
Consider nullification or empty collections re-assignement
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services