author | Davide Libenzi <davidel@xmailserver.org> | |
Sat, 8 Nov 2008 05:24:33 +0000 (21:24 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 3 Dec 2008 07:45:37 +0000 (23:45 -0800) | ||
commit | 733070bea9ce28d557f0b0950acc05b3fe6ff6c6 | |
tree | 4bfc97b38f65e30f28ac296a392d1cf85b36313a | tree | snapshot |
parent | 0fd9d7e66deb7071da2a568b96c94f94ee890908 | 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 |