* 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:
Eelco Dolstra 2010-11-29 17:07:04 +00:00
parent d3bba0c2d8
commit 77f7a6d591
1 changed files with 1 additions and 0 deletions

View File

@ -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) &&