Hi, On Sat, Jan 27, 2018 at 10:38:12AM +0100, Carsten Schoenert wrote: > Package: git-buildpackage > Version: 0.9.6 > Severity: wishlist > > Hi, > > while doing packaging work on packages which have several hundreds or > gigabytes if source code files it takes currently a long time to import > new upstream tarballs which uses xz for compression. The same amount of > time is needed if gbp needs to recreate the tarball from the upstream > branch. This happens because the xz command is called without option > '-T|--threads [x]' and thus only one thread is used to do the > compression. > > I've hacked compressor.py a bit to let gbp call 'xz -T 0 ...' for using > the maximum of threads and this is decreasing the time xz needs > significantly. On my quad core machine about about a quarter of the time > as before. > > diff --git a/gbp/pkg/compressor.py b/gbp/pkg/compressor.py > index b1b795f..a345b34 100644 > --- a/gbp/pkg/compressor.py > +++ b/gbp/pkg/compressor.py > @@ -24,7 +24,7 @@ class Compressor(object): > Opts = {'gzip': '-n', > 'bzip2': '', > 'lzma': '', > - 'xz': ''} > + 'xz': '"-T 0"'} > > Exts = {'gzip': 'gz', > 'bzip2': 'bz2', > > But currently pristine-tar may stumble about tarballs which created by > this option, please see #869191 for details. The provided patch in > #869191 is fixing the problems so far for me. > > If possible gbp could become a at least a option for setting up the > number of threads the xz commend will use as long pristine-tar isn't > working properly with all kinds xz archives?
We should not do more options. Multi threaded should be on when: - not using pristine-tar - iff pristine-tar can handle it The first one is simple but what about the second? Cheers, -- Guido