Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 143844 Details for
Bug 262791
Compilation slow when APT is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
cur-hashmap-patch.txt (text/plain), 3.90 KB, created by
Walter Harley
on 2009-08-09 01:55:24 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Walter Harley
Created:
2009-08-09 01:55:24 EDT
Size:
3.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java,v >retrieving revision 1.134 >diff -u -r1.134 CompilationUnitResolver.java >--- dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java 23 Jun 2009 08:26:20 -0000 1.134 >+++ dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java 6 Aug 2009 19:27:44 -0000 >@@ -14,6 +14,7 @@ > import java.util.HashMap; > import java.util.Iterator; > import java.util.Map; >+import java.util.Map.Entry; > > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.OperationCanceledException; >@@ -44,7 +45,6 @@ > import org.eclipse.jdt.internal.compiler.problem.AbortCompilation; > import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; > import org.eclipse.jdt.internal.compiler.problem.ProblemReporter; >-import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; > import org.eclipse.jdt.internal.compiler.util.HashtableOfObjectToInt; > import org.eclipse.jdt.internal.compiler.util.Messages; > import org.eclipse.jdt.internal.core.BinaryMember; >@@ -76,13 +76,13 @@ > * The sources that were requested. > * Map from file name (char[]) to ICompilationUnit. > */ >- HashtableOfObject requestedSources; >+ HashMap requestedSources; > > /* > * The binding keys that were requested. > * Map from file name (char[]) to BindingKey (or ArrayList if multiple keys in the same file). > */ >- HashtableOfObject requestedKeys; >+ HashMap requestedKeys; > > DefaultBindingResolver.BindingTables bindingTables; > >@@ -165,7 +165,7 @@ > int index = 0; > > // walks the source units >- this.requestedSources = new HashtableOfObject(); >+ this.requestedSources = new HashMap(); > for (int i = 0; i < sourceLength; i++) { > org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = sourceUnits[i]; > CompilationUnitDeclaration parsedUnit; >@@ -198,7 +198,7 @@ > } > > // walk the binding keys >- this.requestedKeys = new HashtableOfObject(); >+ this.requestedKeys = new HashMap(); > for (int i = 0; i < keyLength; i++) { > BindingKeyResolver resolver = new BindingKeyResolver(bindingKeys[i], this, this.lookupEnvironment); > resolver.parse(true/*pause after fully qualified name*/); >@@ -741,8 +741,8 @@ > } > > // remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested >- this.requestedSources.removeKey(fileName); >- this.requestedKeys.removeKey(fileName); >+ this.requestedSources.remove(fileName); >+ this.requestedKeys.remove(fileName); > } finally { > // cleanup compilation unit result > unit.cleanUp(); >@@ -753,14 +753,14 @@ > > // remaining binding keys > DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0); >- Object[] keys = this.requestedKeys.valueTable; >- for (int j = 0, keysLength = keys.length; j < keysLength; j++) { >- BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j]; >+ for (Iterator iEntry = this.requestedKeys.entrySet().iterator(); iEntry.hasNext(); ) { >+ Entry e = (Entry)iEntry.next(); >+ BindingKeyResolver keyResolver = (BindingKeyResolver) e.getValue(); > if (keyResolver == null) continue; > Binding compilerBinding = keyResolver.getCompilerBinding(); > IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding); > // pass it to requestor >- astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding); >+ astRequestor.acceptBinding(keyResolver.getKey(), binding); > worked(1); > } > } catch (OperationCanceledException e) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262791
:
136547
| 143844