[pacman-dev] [PATCH] pkgdelta: Use high compression options offered by xdelta3

Mohammad_AlSaleh ce.mohammad.alsaleh at gmail.com
Tue Dec 30 17:08:32 UTC 2014


On Wed, Dec 31, 2014 at 01:59:51AM +1000, Allan McRae wrote:
> On 31/12/14 01:14, Mohammad Alsaleh wrote:
> >  * Add -9 which is the highest compression level.
> >  * Use lzma for secondary compression.
> 
> I believe I said a patch adding '-9 -S djw' would be accepted in the
> last discussion of this.
> 
> How does lzma for secondary compression compare to djw in terms of
> memory footprint and speed?
> 

Using an aging Laptop (Core 2 Due).
Time is the samllest in 4 runs.

inkscape:
05.765s    139.50MiB    default
09.748s    235.02MiB    -9 -S djw
09.315s    242.86MiB    -9 -S lzma

clang:
15.492s    140.46MiB    default
36.503s    236.11MiB    -9 -S djw
39.293s    243.68MiB    -9 -S lzma

> > 
> >  Decompression speed is largely unaffected as most cycles are consumed
> >  by xz for re-compression.
> > 
> >  Some numbers:
> > 
> >  clang x86_64 [3.5.0-2.1 to 3.5.0-3]
> >  17.21MiB      default      (0.73)
> >  15.67MiB      -9           (0.67)
> >  13.59MiB      -9 -S djw    (0.58)
> >  12.01MiB      -9 -S lzma   (0.51)
> > 
> >  inkscape x86_64 [0.48.5-3 to 0.48.5-4]
> >  02.69MiB      default      (0.21)
> >  01.64MiB      -9           (0.13)
> >  01.30MiB      -9 -S djw    (0.10)
> >  01.01MiB      -9 -S lzma   (0.08)
> > 
> > Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh at gmail.com>
> > ---
> >  scripts/pkgdelta.sh.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in
> > index be49326..fe63974 100644
> > --- a/scripts/pkgdelta.sh.in
> > +++ b/scripts/pkgdelta.sh.in
> > @@ -140,7 +140,7 @@ create_xdelta()
> >  	deltafile=$(dirname "$newfile")/$pkgname-${oldver}_to_${newver}-$arch.delta
> >  	local ret=0
> >  
> > -	xdelta3 -q -f -s "$oldfile" "$newfile" "$deltafile" || ret=$?
> > +	xdelta3 -q -f -9 -S lzma -s "$oldfile" "$newfile" "$deltafile" || ret=$?
> >  	if (( ret )); then
> >  		error "$(gettext "Delta could not be created.")"
> >  		return 1
> > 


More information about the pacman-dev mailing list