Skip to content

Commit cc13431

Browse files
committed
Merge branch 'nd/threaded-index-pack'
Enables threading in index-pack to resolve base data in parallel. By Nguyễn Thái Ngọc Duy (3) and Ramsay Jones (1) * nd/threaded-index-pack: index-pack: disable threading if NO_PREAD is defined index-pack: support multithreaded delta resolving index-pack: restructure pack processing into three main functions compat/win32/pthread.h: Add an pthread_key_delete() implementation
2 parents 3f8acaa + b038a61 commit cc13431

File tree

5 files changed

+331
-67
lines changed

5 files changed

+331
-67
lines changed

Documentation/git-index-pack.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ OPTIONS
7474
--strict::
7575
Die, if the pack contains broken objects or links.
7676

77+
--threads=<n>::
78+
Specifies the number of threads to spawn when resolving
79+
deltas. This requires that index-pack be compiled with
80+
pthreads otherwise this option is ignored with a warning.
81+
This is meant to reduce packing time on multiprocessor
82+
machines. The required amount of memory for the delta search
83+
window is however multiplied by the number of threads.
84+
Specifying 0 will cause git to auto-detect the number of CPU's
85+
and use maximum 3 threads.
86+
7787

7888
Note
7989
----

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ builtin/branch.o builtin/checkout.o builtin/clone.o builtin/reset.o branch.o tra
22262226
builtin/bundle.o bundle.o transport.o: bundle.h
22272227
builtin/bisect--helper.o builtin/rev-list.o bisect.o: bisect.h
22282228
builtin/clone.o builtin/fetch-pack.o transport.o: fetch-pack.h
2229-
builtin/grep.o builtin/pack-objects.o transport-helper.o thread-utils.o: thread-utils.h
2229+
builtin/index-pack.o builtin/grep.o builtin/pack-objects.o transport-helper.o thread-utils.o: thread-utils.h
22302230
builtin/send-pack.o transport.o: send-pack.h
22312231
builtin/log.o builtin/shortlog.o: shortlog.h
22322232
builtin/prune.o builtin/reflog.o reachable.o: reachable.h

0 commit comments

Comments
 (0)