JDK-7142086 : performance problem in Check.checkOverrideClashes(...)
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: unknown
  • Submitted: 2012-02-02
  • Updated: 2016-12-06
  • Resolved: 2012-02-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u4Fixed 8 b27Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Could you please look at https://netbeans.org/bugzilla/show_bug.cgi?id=205293 ?
There is a profiler snapshot attached showing substantial delays inside of Check.checkOverrideClashes(...) that has been refactored couple of times recently.

Comments
SUGGESTED FIX A webrev of this fix is available at the following URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/84b61130cbed
15-02-2012

EVALUATION Problem seems to be caused by the fact that MethodSymbol.overrides is called too many times. By refactoring the code we obtained the following numbers (thanks Jan Lahoda): As for a benchmark, I generated a simple abstract class with many (1000) overloaded abstract methods, and created two testcases (t1.zip, t2.zip): -t1, using a JDK7 javac, takes about 4 minutes to compile. Using the patched version (on a dev build of JDK8), it takes less than 10 seconds. -t2 (which includes a class that implements the abstract methods), I did not wait for build on JDK7 - it took more than 30 minutes, with the patch it takes less than 30 seconds.
02-02-2012