diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2010-05-02 15:04:41 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-02 07:59:50 -0700 |
commit | 582aa00bdffb27abcf1b27d541b4c231a395d3b8 (patch) | |
tree | 4dc75d74940955a17d0b3c2e4e61e55034dd8ab3 /test-date.c | |
parent | index-pack: fix trivial typo in usage string (diff) | |
download | tgif-582aa00bdffb27abcf1b27d541b4c231a395d3b8.tar.xz |
git diff too slow for a file
Ever since the xdiff library had been introduced to git, all its callers
have used the flag XDF_NEED_MINIMAL. It makes sure that the smallest
possible diff is produced, but that takes quite some time if there are
lots of differences that can be expressed in multiple ways.
This flag makes a difference for only 0.1% of the non-merge commits in
the git repo of Linux, both in terms of diff size and execution time.
The patches there are mostly nice and small.
SungHyun Nam however reported a case in a different repo where a diff
took more than 20 times longer to generate with XDF_NEED_MINIMAL than
without. Rebasing became really slow.
This patch removes this flag from all callers. The default of xdiff is
saner because it has minimal to no impact in the normal case of small
diffs and doesn't incur that much of a speed penalty for large ones.
A follow-up patch may introduce a command line option to set the flag if
the user needs it, similar to GNU diff's -d/--minimal.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-date.c')
0 files changed, 0 insertions, 0 deletions