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 65906 Details for
Bug 185509
Improve performance of the symbolic link recursion detection in UnifiedTree
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 to avoid unnecessary getCanonicalPath() on same parent
unifiedTree_prevCanonical_patch.txt (text/plain), 2.27 KB, created by
Martin Oberhuber
on 2007-05-04 07:22:42 EDT
(
hide
)
Description:
Patch to avoid unnecessary getCanonicalPath() on same parent
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2007-05-04 07:22:42 EDT
Size:
2.27 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.resources >Index: src/org/eclipse/core/internal/localstore/UnifiedTree.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java,v >retrieving revision 1.44 >diff -u -r1.44 UnifiedTree.java >--- src/org/eclipse/core/internal/localstore/UnifiedTree.java 30 Apr 2007 15:57:13 -0000 1.44 >+++ src/org/eclipse/core/internal/localstore/UnifiedTree.java 4 May 2007 11:19:13 -0000 >@@ -56,6 +56,10 @@ > > /** path prefixes for checking symbolic link cycles */ > protected PrefixPool pathPrefixHistory, rootPathHistory; >+ >+ /** cache for avoiding unnecessary getCanonicalPath() calls on previous parent */ >+ private IFileStore prevFileStore; >+ private String prevCanonicalPath; > > /** tree's root */ > protected IResource root; >@@ -353,6 +357,7 @@ > if (pathPrefixHistory != null) { > pathPrefixHistory.clear(); > rootPathHistory.clear(); >+ prevFileStore = null; > } > addRootToQueue(); > addElementToQueue(levelMarker); >@@ -439,8 +444,15 @@ > if (parentFile == null) > return false; > //get canonical path for both child and parent >+ String parentPath; >+ if (parentStore == prevFileStore) { >+ parentPath = prevCanonicalPath; >+ } else { >+ parentPath = parentFile.getCanonicalPath()+'/'; >+ prevFileStore = parentStore; >+ prevCanonicalPath = parentPath; >+ } > java.io.File childFile = new java.io.File(parentFile, localInfo.getName()); >- String parentPath = parentFile.getCanonicalPath()+'/'; > String childPath = childFile.getCanonicalPath()+'/'; > //get or instantiate the prefix and root path histories. > //Might be done earlier - for now, do it on demand. >@@ -456,7 +468,7 @@ > } else if (rootPathHistory.hasPrefixOf(childPath)) { > //child points into a different portion of the tree that we visited already before, or will certainly visit. > //This does not introduce a loop yet, but introduces duplicate resources. >- //TODO Ideally, such duplicates should be modelled as linked resources. See bug 105534 >+ //TODO Ideally, such duplicates should be modeled as linked resources. See bug 105554 > return false; > } else { > //child neither introduces a loop nor points to a known tree.
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 185509
: 65906