United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6250473 REGRESSION: apt slower in Tiger update train than FCS due to name lookup
6250473 : REGRESSION: apt slower in Tiger update train than FCS due to name lookup

Details
Type:
Bug
Submit Date:
2005-04-05
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2005-04-16
Component:
tools
OS:
generic
Sub-Component:
apt
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
6

Related Reports
Backport:
Relates:

Sub Tasks

Description
BEA has noted a significant speed regression in apt from FCS to update 2.  Some of the cause appears to be the fixes for 6174696 "apt getTypeDeclaration(Strings) cannot find classes that are not already loaded."  Include a search of javac symbol tables before turning to the more general purpose lookup reduces the speed regression.

###@###.### 2005-04-05 02:08:26 GMT

                                    

Comments
SUGGESTED FIX

src/share/classes/com/sun/tools/apt/mirror/declaration>sccs sccsdiff -r1.7 -r1.8 DeclarationMaker.java       

------- DeclarationMaker.java -------
4c4
<  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
---
>  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
30c30
< 
---
>     private JavaCompiler javacompiler;
45a46
>       this.javacompiler = JavaCompiler.instance(context);
78c79
<           Symbol s = nameToSymbol(name);
---
>           Symbol s = nameToSymbol(name, false);
125c126
<       Symbol s = nameToSymbol(name);
---
>       Symbol s = nameToSymbol(name, true);
137,138c138
<     private Symbol nameToSymbol(String name) {
<       JavaCompiler jc = JavaCompiler.instance(context);
---
>     private Symbol nameToSymbol(String name, boolean classCache) {
140c140,149
<       s = jc.resolveIdent(name);
---
>       Name nameName = env.names.fromString(name);
>       if (classCache)
>           s = env.symtab.classes.get(nameName);
>       else
>           s = env.symtab.packages.get(nameName);
> 
>       if (s != null && s.exists())
>           return s;
> 
>       s = javacompiler.resolveIdent(name);

###@###.### 2005-04-07 22:44:00 GMT
                                     
2005-04-07
EVALUATION

Should be fixed.

###@###.### 2005-04-05 02:11:19 GMT
                                     
2005-04-05



Hardware and Software, Engineered to Work Together