From 367f4a4343d467ac76641362b102bc86da5cb584 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 10 Sep 2007 00:06:11 -0400 Subject: [PATCH] threaded delta search: specify number of threads at run time This adds a --threads= parameter to 'git pack-objects' with documentation. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- Documentation/git-pack-objects.txt | 8 ++++++++ builtin-pack-objects.c | 26 +++++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt index 6f17cff24..f9b97956e 100644 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@ -173,6 +173,14 @@ base-name:: length, this option typically shrinks the resulting packfile by 3-5 per-cent. +--threads=:: + Specifies the number of threads to spawn when searching for best + delta matches. This requires that pack-objects be compiled with + pthreads otherwise this option is ignored with a warning. + This is meant to reduce packing time on multiprocessor machines. + The required amount of memory for the delta search window is + however multiplied by the number of threads. + --index-version=[,]:: This is intended to be used by the test suite only. It allows to force the version for the generated pack index, and to force diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index b13558ee7..42698d294 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -24,7 +24,7 @@ git-pack-objects [{ -q | --progress | --all-progress }] \n\ [--max-pack-size=N] [--local] [--incremental] \n\ [--window=N] [--window-memory=N] [--depth=N] \n\ [--no-reuse-delta] [--no-reuse-object] [--delta-base-offset] \n\ - [--non-empty] [--revs [--unpacked | --all]*] [--reflog] \n\ + [--threads=N] [--non-empty] [--revs [--unpacked | --all]*] [--reflog] \n\ [--stdout | base-name] [