summaryrefslogtreecommitdiff
path: root/contrib/git-svn/git-svn.perl
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-02-27 23:09:55 -0500
committerJunio C Hamano <junkio@cox.net>2006-02-27 21:38:01 -0800
commit2b8d9347aa1a11f1ac13591f89ca9f984d467c77 (patch)
treef1bf04eef41280e6485a9eba63e9354aafda00de /contrib/git-svn/git-svn.perl
parentbec2a69fe4c2dbb377d2742a4def7e3569b4c1d4 (diff)
downloadgit-2b8d9347aa1a11f1ac13591f89ca9f984d467c77.tar.gz
diff-delta: bound hash list length to avoid O(m*n) behavior
The diff-delta code can exhibit O(m*n) behavior with some patological data set where most hash entries end up in the same hash bucket. The latest code rework reduced the block size making it particularly vulnerable to this issue, but the issue was always there and can be triggered regardless of the block size. This patch does two things: 1) the hashing has been reworked to offer a better distribution to atenuate the problem a bit, and 2) a limit is imposed to the number of entries that can exist in the same hash bucket. Because of the above the code is a bit more expensive on average, but the problematic samples used to diagnoze the issue are now orders of magnitude less expensive to process with only a slight loss in compression. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib/git-svn/git-svn.perl')
0 files changed, 0 insertions, 0 deletions