xdiff/xprepare: improve O(n*m) performance in xdl_cleanup_records()
xdiff/xprepare: improve O(n*m) performance in xdl_cleanup_records()

In xdl_cleanup_records(), we see O(n*m) performance, where n is the
number of records from xdf->dstart to xdf->dend, and m is the size of a
bucket in xdf->rhash (<= by mlim).

Here, we improve this to O(n) by pre-computing nm (in rcrec->len(1|2))
in xdl_classify_record().

Reported-by: Marat Radchenko <2089d3fab0c51db3809c7a5f7dbc68b8f0e36ef4@slonopotamus.org>
Signed-off-by: Tay Ray Chuan <781f23e367a7ada1fde54f9860fdd95ca652794e@gmail.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git