Tweak in bsdiff algorithm to reduce patching time

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Tweak in bsdiff algorithm to reduce patching time

gomu
Hi,

I was tweaking with the bsdiff algorithm in java ( https://github.com/malensek/jbsdiff ) to reduce the patching time. I observed that there are three parts( control block, diff block, extra block) in the patch file generated by bsdiff. There is a reduction in size when we compress the control and diff block, but in case of extra block the size tend to increase or remain the same. 

So I modified it by leaving the extra block uncompressed and it resulted in reduction in patch time by as large as 50-90%. Also the patch file size decreased by 150KB for a 50MB file. It can be inferred that compressing the extra block incurs a large overhead in time and doesn't give reduction in space too. Can this change be incorporated into ( https://android.googlesource.com/platform/external/bsdiff/ ) ?

Thanks,
gomu

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Tweak in bsdiff algorithm to reduce patching time

Glenn Kasten
Sorry, patches are off-topic for this group.  Please either submit a pull request to upstream GitHub
and wait for it to propagate down to external/bsdiff (which may take a while), or if you want to offer a faster path
you can do repo upload to external/bsdiff; follow the procedure at
"Contribute to the code" section of
https://source.android.com/setup/contribute#contribute-to-the-code


On Tuesday, January 29, 2019 at 10:32:54 AM UTC-8, gomu wrote:
Hi,

I was tweaking with the bsdiff algorithm in java ( <a href="https://github.com/malensek/jbsdiff" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmalensek%2Fjbsdiff\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGatOe1X5CfC5udBlXWvAstRhKz8g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmalensek%2Fjbsdiff\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGatOe1X5CfC5udBlXWvAstRhKz8g&#39;;return true;">https://github.com/malensek/jbsdiff ) to reduce the patching time. I observed that there are three parts( control block, diff block, extra block) in the patch file generated by bsdiff. There is a reduction in size when we compress the control and diff block, but in case of extra block the size tend to increase or remain the same. 

So I modified it by leaving the extra block uncompressed and it resulted in reduction in patch time by as large as 50-90%. Also the patch file size decreased by 150KB for a 50MB file. It can be inferred that compressing the extra block incurs a large overhead in time and doesn't give reduction in space too. Can this change be incorporated into ( <a href="https://android.googlesource.com/platform/external/bsdiff/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://android.googlesource.com/platform/external/bsdiff/&#39;;return true;" onclick="this.href=&#39;https://android.googlesource.com/platform/external/bsdiff/&#39;;return true;">https://android.googlesource.com/platform/external/bsdiff/ ) ?

Thanks,
gomu

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.