diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2015-04-13 01:01:13 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-05-10 23:17:36 +0200 |
commit | 8b9623511f216027294b0cf4d2ecb7710915238a (patch) | |
tree | 1bf4b9b98eac4b9565e60002d1964cc33f317875 /org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20150202203538-Mars-M5.tpd | |
parent | 4ac7cf003b802b66d085451a5b3dc4912c56e230 (diff) | |
download | jgit-8b9623511f216027294b0cf4d2ecb7710915238a.tar.gz jgit-8b9623511f216027294b0cf4d2ecb7710915238a.zip |
Use ANY_DIFF filter in ResolveMerger only for bare repositories
As Chris pointed out change I822721c76c64e614f87a080ced2457941f53adcd
slowed down merge since ANY_DIFF filter is much less efficient than the
manual detection of diffs done in ResolveMerger.processEntry() since it
avoids unnecessary filesystem calls using the git index. Hence only set
the ANY_DIFF filter on bare repositories which don't have a working tree
to scan.
To test performance I used the setup described in Chris' comment on
change I822721c76c64e614f87a080ced2457941f53adcd and modified
ResolveMerger.mergeTrees() to not add the working tree in order to
simulate merging in a bare repository.
At least on Mac I couldn't detect a speedup, with and without the
ANY_DIFF filter merge test takes an average 0.67sec.
Change-Id: I17b3a06f369cee009490f54ad1a2deb6c145c7cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20150202203538-Mars-M5.tpd')
0 files changed, 0 insertions, 0 deletions