JDK-7142086 : performance problem in Check.checkOverrideClashes(...)
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.
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.
A webrev of this fix is available at the following URL:
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.