]> source.dussan.org Git - jgit.git/commit
Add a performance optimized variant of the ANY_DIFF filter 66/2066/5
authorChristian Halstrick <christian.halstrick@sap.com>
Thu, 9 Dec 2010 17:24:52 +0000 (18:24 +0100)
committerChristian Halstrick <christian.halstrick@sap.com>
Thu, 9 Dec 2010 17:51:33 +0000 (18:51 +0100)
commit1783749e169c57cef7131e1749a01ee269b89df8
treef5d3dc14016085e38653f24e1e748ea6c8c5d447
parent6bca46e1683a07f18f00f6ad552eab79ab50bb88
Add a performance optimized variant of the ANY_DIFF filter

If a treewalk walks also over index and the workingtree then the
IndexDiffFilter filter can be used which works much faster then
the semantically equivalent ANY_DIFF filter. This is because this
filter can better avoid computing SHA-1 ids over the content of
working-tree files which is very costly.

This fix will significantly improve the performance of e.g.
EGit's commit dialog.

Change-Id: I2a51816f4ed9df2900c6307a54cd09f50004266f
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Philipp Thun <philipp.thun@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/IndexDiffFilterTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java