Code

xdiff: give up scanning similar lines early
authorDavide Libenzi <davidel@xmailserver.org>
Sat, 8 Nov 2008 05:24:33 +0000 (21:24 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Dec 2008 07:45:37 +0000 (23:45 -0800)
commit733070bea9ce28d557f0b0950acc05b3fe6ff6c6
tree4bfc97b38f65e30f28ac296a392d1cf85b36313a
parent0fd9d7e66deb7071da2a568b96c94f94ee890908
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>
xdiff/xprepare.c