JDK-6887978 : compilation very slow for classes with many fields
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2009-10-03
  • Updated: 2010-10-28
  • Resolved: 2010-10-28
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
7Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
test/gc/test/gc/6845368/bigobj.java in the hotspot repo includes a class with close to 64K fields.  javac takes several minutes to compile this file on slower machines.  Sample output from collect/er_print:

Functions sorted by metric: Exclusive User CPU Time

Excl. User CPU  Incl. User CPU   Name  
                                       
   sec.      %     sec.      %    
166.506 100.00  166.506 100.00   <Total>
 94.656  56.85   95.837  57.56   com.sun.tools.javac.code.Scope.lookup(com.sun.tools.javac.util.Name)
 57.200  34.35   57.200  34.35   com.sun.tools.javac.code.Scope$Entry.next()
  5.794   3.48    5.794   3.48   <JVM-System>
  1.181   0.71    1.181   0.71   com.sun.tools.javac.code.Scope$Entry.access$000(com.sun.tools.javac.code.Scope$Entry)
  0.220   0.13    0.220   0.13   <Unknown>
  0.200   0.12  112.809  67.75   com.sun.tools.javac.comp.Check.checkConflicts(com.sun.tools.javac.util.JCDiagnostic$DiagnosticPosition, com.sun.tools.javac.code.Symbol, com.sun.tools.javac.code.Symbol$TypeSymbol)
  0.180   0.11    0.440   0.26   com.sun.tools.javac.parser.Scanner.scanIdent()
  0.170   0.10    0.170   0.10   com.sun.tools.javac.util.List.nonEmpty()
  0.160   0.10   41.099  24.68   com.sun.tools.javac.comp.MemberEnter.visitVarDef(com.sun.tools.javac.tree.JCTree$JCVariableDecl)

Comments
EVALUATION Fix for 6460352 now pushed; should be in next promoted build.
28-10-2010

EVALUATION This looks like the knwon problem with javac Scopes. A fix for that is expected shortly.
10-10-2009