United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7142086 performance problem in Check.checkOverrideClashes(...)
7142086 : performance problem in Check.checkOverrideClashes(...)

Details
Type:
Bug
Submit Date:
2012-02-02
Status:
Closed
Updated Date:
2013-03-18
Project Name:
JDK
Resolved Date:
2012-02-24
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
unknown
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:
8

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

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
                                     
2012-02-15
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.
                                     
2012-02-02



Hardware and Software, Engineered to Work Together