Details
-
Bug
-
Resolution: Duplicate
-
P4
-
8u102, 9
Description
When hierarchies define many many methods with the same name, the performance of the override clash check degenerates:
http://stackoverflow.com/questions/39111439/java8-slow-compiling-for-interfaces-with-default-methods
Attached is a simple generator 'gen.sh' - the generator takes an int parameter (the number of overloads in a visitor class) and generates a 'bad' hierarchy.
If the generator parameter is high enough (2000), javac takes a very long time to compile this example. Most of the time is spent in the routines which check validity of overriding - since most routines prune the checking space simply by filtering by name - which is clearly ineffective if all methods have same names but different signatures.
http://stackoverflow.com/questions/39111439/java8-slow-compiling-for-interfaces-with-default-methods
Attached is a simple generator 'gen.sh' - the generator takes an int parameter (the number of overloads in a visitor class) and generates a 'bad' hierarchy.
If the generator parameter is high enough (2000), javac takes a very long time to compile this example. Most of the time is spent in the routines which check validity of overriding - since most routines prune the checking space simply by filtering by name - which is clearly ineffective if all methods have same names but different signatures.
Attachments
Issue Links
- duplicates
-
JDK-8179418 Exponential growth in compile times when adding simple interfaces
- Open
- relates to
-
JDK-8179418 Exponential growth in compile times when adding simple interfaces
- Open