diff options
| author | Philipp Thun | 2011-01-13 16:09:34 +0000 |
|---|---|---|
| committer | Philipp Thun | 2011-01-13 16:09:34 +0000 |
| commit | e9cbc258c5908de4faedf12e3788c84a1bf9e156 (patch) | |
| tree | dbd7c06d5f9a0cec4c59db0203883955723fc75d | |
| parent | 8d7705d2709e80ea50f9115c2abbca98e9d9344c (diff) | |
| download | egit-e9cbc258c5908de4faedf12e3788c84a1bf9e156.tar.gz egit-e9cbc258c5908de4faedf12e3788c84a1bf9e156.tar.xz egit-e9cbc258c5908de4faedf12e3788c84a1bf9e156.zip | |
Check FS.supportsExecute() before resolving file from resource
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.java | 3 |
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 b7ded6960a..abb3f04a11 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; |
