author | Davide Libenzi <davidel@xmailserver.org> | |
Sat, 8 Nov 2008 05:24:33 +0000 (21:24 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 8 Nov 2008 17:28:30 +0000 (09:28 -0800) | ||
commit | 9b28d55401a529ff08c709f42f66e765c93b0a20 | |
tree | 160929221ee2becefe85d95d5828aa91d07233ef | tree | snapshot |
parent | 6331adb9c4ec36c70dc3ecc6eb46b7dddb36952d | commit | diff |
xdiff: give up scanning similar lines early
In a corner case of large files whose lines do not match uniquely, the
loop to eliminate a line that matches multiple locations adjacent to a run
of lines that do not uniquely match wasted too much cycles. Fix this by
giving up early after scanning 100 lines in both direction.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In a corner case of large files whose lines do not match uniquely, the
loop to eliminate a line that matches multiple locations adjacent to a run
of lines that do not uniquely match wasted too much cycles. Fix this by
giving up early after scanning 100 lines in both direction.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xprepare.c | diff | blob | history |