aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-11-29 17:07:04 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-11-29 17:07:04 +0000
commit77f7a6d591e32a4a475552f3e67e3e67b7f71a10 (patch)
tree79ccfcafe659aac94951af8cc91c7f3d5384d50e
parentd3bba0c2d8b879950d55d508ef3fc8dec3559f8f (diff)
* 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.
-rw-r--r--src/bsdiff-4.3/bsdiff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bsdiff-4.3/bsdiff.c b/src/bsdiff-4.3/bsdiff.c
index 150a7f79c..374ed038f 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) &&