diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-11-29 17:07:04 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-11-29 17:07:04 +0000 |
commit | 77f7a6d591e32a4a475552f3e67e3e67b7f71a10 (patch) | |
tree | 79ccfcafe659aac94951af8cc91c7f3d5384d50e /src | |
parent | d3bba0c2d8b879950d55d508ef3fc8dec3559f8f (diff) | |
download | guix-77f7a6d591e32a4a475552f3e67e3e67b7f71a10.tar.gz |
* Quick hack around one of the pathological cases in bsdiff
(namely, when there is a long region of 0s). On one 86 MiB case, this cut patch generation time from 44m to 2m.
Diffstat (limited to 'src')
-rw-r--r-- | src/bsdiff-4.3/bsdiff.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bsdiff-4.3/bsdiff.c b/src/bsdiff-4.3/bsdiff.c index 150a7f79c4..374ed038fa 100644 --- a/src/bsdiff-4.3/bsdiff.c +++ b/src/bsdiff-4.3/bsdiff.c @@ -277,6 +277,7 @@ int main(int argc,char *argv[]) for(scsc=scan+=len;scan<newsize;scan++) { len=search(I,old,oldsize,new+scan,newsize-scan, 0,oldsize,&pos); + if (len > 64 * 1024) break; for(;scsc<scan+len;scsc++) if((scsc+lastoffset<oldsize) && |