summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMarkus Keller2012-07-12 17:17:12 (EDT)
committer Robin Stocker2012-07-15 07:57:50 (EDT)
commitbd240a28adeecbbd14d30722f49c6888feb0b277 (patch)
treecc0ef565bdf9c3a482aab92d0fdab71e5e4fd6f4
parent9a8dab2eefd1cd26294d062506402164f16dfb0d (diff)
downloadegit-bd240a28adeecbbd14d30722f49c6888feb0b277.zip
egit-bd240a28adeecbbd14d30722f49c6888feb0b277.tar.gz
egit-bd240a28adeecbbd14d30722f49c6888feb0b277.tar.bz2
Use refs cache for tags as wellrefs/changes/50/6750/3
Not using the cache leads to serious performance issues in repos with many tags. Bug: 360658 Change-Id: I335c76af311bcd8fbd2e83fc050ce522a3e71437 Signed-off-by: Markus Keller <markus_keller@ch.ibm.com> Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java
index 312787f..74d8380 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewContentProvider.java
@@ -262,8 +262,7 @@ public class RepositoriesViewContentProvider implements ITreeContentProvider,
List<RepositoryTreeNode<Ref>> refs = new ArrayList<RepositoryTreeNode<Ref>>();
try {
- for (Entry<String, Ref> refEntry : repo.getRefDatabase()
- .getRefs(Constants.R_TAGS).entrySet()) {
+ for (Entry<String, Ref> refEntry : getRefs(repo, Constants.R_TAGS).entrySet()) {
refs.add(new TagNode(node, repo, refEntry.getValue()));
}
} catch (IOException e) {
@@ -510,8 +509,7 @@ public class RepositoriesViewContentProvider implements ITreeContentProvider,
return true;
case TAGS:
try {
- return !repo.getRefDatabase().getRefs(Constants.R_TAGS)
- .isEmpty();
+ return !getRefs(repo, Constants.R_TAGS).isEmpty();
} catch (IOException e) {
return true;
}