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 19395 Details for
Bug 89624
Open on selection proposes twice the same entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with time tracing
patch_org.eclipse.jdt.core.txt (text/plain), 2.79 KB, created by
Jerome Lanneluc
on 2005-03-31 03:33:31 EST
(
hide
)
Description:
Patch with time tracing
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-03-31 03:33:31 EST
Size:
2.79 KB
patch
obsolete
>Index: model/org/eclipse/jdt/internal/core/NameLookup.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java,v >retrieving revision 1.84 >diff -u -r1.84 NameLookup.java >--- model/org/eclipse/jdt/internal/core/NameLookup.java 17 Mar 2005 09:02:55 -0000 1.84 >+++ model/org/eclipse/jdt/internal/core/NameLookup.java 31 Mar 2005 08:31:05 -0000 >@@ -122,11 +122,13 @@ > public long timeSpentInSeekTypesInSourcePackage = 0; > > public NameLookup(IPackageFragmentRoot[] packageFragmentRoots, HashtableOfArrayToObject packageFragments, ICompilationUnit[] workingCopies, Map rootToResolvedEntries) { >+ long start = -1; > if (VERBOSE) { > System.out.println(Thread.currentThread() + " BUILDING NameLoopkup"); //$NON-NLS-1$ > System.out.println(Thread.currentThread() + " -> pkg roots size: " + (packageFragmentRoots == null ? 0 : packageFragmentRoots.length)); //$NON-NLS-1$ > System.out.println(Thread.currentThread() + " -> pkgs size: " + (packageFragments == null ? 0 : packageFragments.size())); //$NON-NLS-1$ > System.out.println(Thread.currentThread() + " -> working copy size: " + (workingCopies == null ? 0 : workingCopies.length)); //$NON-NLS-1$ >+ start = System.currentTimeMillis(); > } > this.packageFragmentRoots = packageFragmentRoots; > try { >@@ -176,19 +178,32 @@ > this.packageFragments.put(pkgName, root); > } else { > if (existing instanceof PackageFragmentRoot) { >- this.packageFragments.put(pkgName, new IPackageFragmentRoot[] {(PackageFragmentRoot) existing, root}); >+ if (!existing.equals(root)) >+ this.packageFragments.put(pkgName, new IPackageFragmentRoot[] {(PackageFragmentRoot) existing, root}); > } else { > IPackageFragmentRoot[] roots = (IPackageFragmentRoot[]) existing; > int rootLength = roots.length; >- System.arraycopy(roots, 0, roots = new IPackageFragmentRoot[rootLength+1], 0, rootLength); >- roots[rootLength] = root; >- this.packageFragments.put(pkgName, roots); >+ boolean containsRoot = false; >+ for (int j = 0; j < rootLength; j++) { >+ if (roots[j].equals(root)) { >+ containsRoot = true; >+ break; >+ } >+ } >+ if (containsRoot) { >+ System.arraycopy(roots, 0, roots = new IPackageFragmentRoot[rootLength+1], 0, rootLength); >+ roots[rootLength] = root; >+ this.packageFragments.put(pkgName, roots); >+ } > } > } > visited.add(root); > } > } > this.rootToResolvedEntries = rootToResolvedEntries; >+ if (VERBOSE) { >+ System.out.println(Thread.currentThread() + " -> spent: " + (start - System.currentTimeMillis()) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ >+ } > } > > /**
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 89624
:
19355
|
19379
| 19395