Consider Zucchini for compressing partial updates
Categories
(Toolkit :: Application Update, enhancement, P3)
Tracking
()
People
(Reporter: agashlin, Unassigned)
References
Details
(Whiteboard: [iu_tracking])
Zucchini is an executable patch algorithm currently used by Google in Chrome updates. It is a substantial improvement over Google's earlier Courgette, both in compression ratio and speed, and also a good deal better than our current mbsdiff (BSDiff 4) in compression ratio.
All the documentation I know of is in the Chromium source tree. The big idea is this: A lot of the change that happens between builds is just bulk movement of code, and this also causes all cross-references to that code to change. Zucchini encodes the movement of the code/data ("equivalences"), like most binary diff tools, but it also disassembles the program in order to find references into that moving data (the "target"). If it copies code containing those references, it can adjust them to point at the new location of the target, without needing to store that adjustment explicitly.
I ran some tests with Firefox updates a few versions ago, here's how it compares (sizes in MB):
patch from | to | mbsdiff | courgette | zucchini | mbsdiff - zucchini | mbsdiff - zucchini pct |
---|---|---|---|---|---|---|
68.0.2 | 69.0 | 27.33 | 23.83 | 21.18 | 6.15 | 22.5% |
69.0 | 69.0.1 | 5.17 | 2.19 | 1.94 | 3.23 | 62.5% |
69.0.3 | 70.0 | 18.42 | 14.19 | 12.52 | 5.90 | 32.0% |
70.0 | 70.0.1 | 5.54 | 2.46 | 2.15 | 3.38 | 61.1% |
Patch application takes about twice as long as mbsdiff, (Courgette is about 4x mbsdiff), but that is partially offset by the LZMA (xz) decompression being much faster when handling smaller patches.
A practical hurdle to incorporating Zucchini is that it relies on some standard libraries and headers elsewhere in the Chromium tree. We've already vendored some of this, twice, for sandboxing and ipc, and it's unpleasant to bring in yet another version of some of this.
This may not be worth the added complexity — BSDiff does very well considering how simple it is — but since we still have bug 504624 for Courgette I thought it would be good to make a case for Zucchini.
Updated•4 years ago
|
Description
•