forked from lix-project/lix
* 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.
This commit is contained in:
parent
d3bba0c2d8
commit
77f7a6d591
|
@ -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) &&
|
||||
|
|
Loading…
Reference in a new issue