-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b01
When Check.checkOverride calls checkDeprecated it unconditionally calls TreeInfo.diagnosticPositionFor, even though checkDeprecated may not end up emitting a diagnostic: http://hg.openjdk.java.net/jdk/jdk/file/6879069d9d94/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java#l1800
I noticed this while profiling a very large generated compilation unit, which was spending a significant fraction of its time in calls to TreeInfo.diagnosticPositionFor. That method is relatively expensive if it isn't able to find a diagnostic position, because it has to scan the entire tree that's passed in.
I noticed this while profiling a very large generated compilation unit, which was spending a significant fraction of its time in calls to TreeInfo.diagnosticPositionFor. That method is relatively expensive if it isn't able to find a diagnostic position, because it has to scan the entire tree that's passed in.