aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Thun2011-01-13 11:09:34 (EST)
committerPhilipp Thun2011-01-13 11:09:34 (EST)
commite9cbc258c5908de4faedf12e3788c84a1bf9e156 (patch)
treedbd7c06d5f9a0cec4c59db0203883955723fc75d
parent8d7705d2709e80ea50f9115c2abbca98e9d9344c (diff)
downloadegit-e9cbc258c5908de4faedf12e3788c84a1bf9e156.zip
egit-e9cbc258c5908de4faedf12e3788c84a1bf9e156.tar.gz
egit-e9cbc258c5908de4faedf12e3788c84a1bf9e156.tar.bz2
Check FS.supportsExecute() before resolving file from resourcerefs/changes/47/2247/1
The performance of building a list of ResourceEntries is improved by checking the file system's support for executable files before checking the actual file as this requires resolving the file first - which seems to be expensive when many resources exist. This only affects platforms that do not support executable files, e.g. Windows. See bug 325393 for performance results. Bug: 325393 Change-Id: I6b353ad1ad184cc0102ee430cc93d85bd29294ea Signed-off-by: Philipp Thun <philipp.thun@sap.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java
index b7ded69..abb3f04 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java
@@ -183,7 +183,8 @@ public class ContainerTreeIterator extends WorkingTreeIterator {
switch (f.getType()) {
case IResource.FILE:
- if (FS.DETECTED.canExecute(asFile()))
+ if (FS.DETECTED.supportsExecute()
+ && FS.DETECTED.canExecute(asFile()))
mode = FileMode.EXECUTABLE_FILE;
else
mode = FileMode.REGULAR_FILE;