aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/export_orig.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-01-29 15:25:39 +0100
committerGuido Günther <agx@sigxcpu.org>2018-01-29 15:52:54 +0100
commitfd81e454339de50931594bd150857eb88a516a98 (patch)
treef70520f684c8e7725255b8712df9a4089fc5c1d0 /gbp/scripts/export_orig.py
parent5f2120b353dad294cf98fbc2cc704e742d87d6be (diff)
Turn on several threads when creating xz/lzma tarballs
and not using pristine-tar. Gives a 50% speedup on my machine: $ time gbp export-orig --no-pristine-tar --force-create gbp:info: Creating thunderbird_52.6.0.orig.tar.xz from 'upstream/52.6.0' gbp:info: Creating additional tarball 'thunderbird_52.6.0.orig-thunderbird-l10n.tar.xz' from 'dea43c2b49f11d68f05edac2bd9d6c5d1e1f4bcb' gbp:info: Creating additional tarball 'thunderbird_52.6.0.orig-lightning-l10n.tar.xz' from '9adcd261726ccb160c4fd6947f7cbfe9df2e581b' real 8m27,153s user 7m23,717s sys 0m3,015s 0|agx@bogon:/var/scratch/debian/icedove/icedove (debian/wheezy)$ time gbp-from-sourcetree export-orig --no-pristine-tar --force-create gbp:info: Creating thunderbird_52.6.0.orig.tar.xz from 'upstream/52.6.0' gbp:info: Creating additional tarball 'thunderbird_52.6.0.orig-thunderbird-l10n.tar.xz' from 'dea43c2b49f11d68f05edac2bd9d6c5d1e1f4bcb' gbp:info: Creating additional tarball 'thunderbird_52.6.0.orig-lightning-l10n.tar.xz' from '9adcd261726ccb160c4fd6947f7cbfe9df2e581b' real 4m3,080s user 11m18,733s sys 0m3,499s Thanks: Carsten Schönert for the suggestion Closes: #888572
Diffstat (limited to 'gbp/scripts/export_orig.py')
-rwxr-xr-xgbp/scripts/export_orig.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/scripts/export_orig.py b/gbp/scripts/export_orig.py
index 95b83da5..01bf33cc 100755
--- a/gbp/scripts/export_orig.py
+++ b/gbp/scripts/export_orig.py
@@ -202,7 +202,8 @@ def git_archive_build_origs(repo, source, output_dir, options):
@param options: the parsed options
@type options: C{dict} of options
"""
- comp = Compressor(options.comp_type, options.comp_level)
+ parallel = not options.pristine_tar
+ comp = Compressor(options.comp_type, options.comp_level, parallel)
upstream_tree = git_archive_get_upstream_tree(repo, source, options)
gbp.log.info("Creating %s from '%s'" % (source.upstream_tarball_name(comp.type),
upstream_tree))