Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kinzler2011-02-17 12:38:48 +0000
committerMathias Kinzler2011-02-17 12:38:48 +0000
commit611459632b776891dd85700354461cf715c2ac54 (patch)
tree97ee01c6a8f0db50b66bd9cb703d95e04d85da93 /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
parent9b37169ddfa9f1ee249cd1154bd8b38bc328b14d (diff)
downloadegit-611459632b776891dd85700354461cf715c2ac54.tar.gz
egit-611459632b776891dd85700354461cf715c2ac54.tar.xz
egit-611459632b776891dd85700354461cf715c2ac54.zip
[historyView] Performance first part
This improves the performance of the CommitMessageViewer by only rendering the commit message and other meta information by default. The diffs for the files in the commit are not rendered immediately when clicking on a commit, but only when the user selects files in the file list. This results in dramatic performance improvements if there are commits containing many files. The user can still click "select all" in the file list to get all the diffs into the view. In addition, the diffs are rendered asynchronously letting the user cancel the operation when it takes too long. Some tracing was added to help maintenance in the future. Bug: 337081 Change-Id: Idc2cf4119c8b34e048c3c345dedbd79c336b7063 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index df3d9cd452..833dcd558e 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -1152,8 +1152,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
}
setWalkStartPoints(db, headId);
- final TreeWalk fileWalker = setupFileViewer(db, paths);
- setupCommentViewer(db, fileWalker);
+ setupFileViewer(db, paths);
+ setupCommentViewer(db);
scheduleNewGenerateHistoryJob();
} finally {
@@ -1288,9 +1288,8 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener {
}
}
- private void setupCommentViewer(Repository db, final TreeWalk fileWalker) {
- commentViewer.setTreeWalk(fileWalker);
- commentViewer.setDb(db);
+ private void setupCommentViewer(Repository db) {
+ commentViewer.setRepository(db);
commentViewer.refresh();
}

Back to the top