Skip to content

Commit

Permalink
Merge branch 'np/delta'
Browse files Browse the repository at this point in the history
* np/delta:
  builtin-pack-objects.c: avoid bogus gcc warnings
  threaded delta search: proper locking for cache accounting
  threaded delta search: add pack.threads config variable
  fix threaded delta search locking
  threaded delta search: specify number of threads at run time
  threaded delta search: better chunck split point
  threaded delta search: refine work allocation
  basic threaded delta search
  rearrange delta search progress reporting
  localize window memory usage accounting
  straighten the list of objects to deltify
  • Loading branch information
Junio C Hamano committed Sep 15, 2007
2 parents 357c5e0 + e1ef867 commit d225ae5
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 59 deletions.
10 changes: 9 additions & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,17 @@ pack.deltaCacheSize::
A value of 0 means no limit. Defaults to 0.

pack.deltaCacheLimit::
The maxium size of a delta, that is cached in
The maximum size of a delta, that is cached in
gitlink:git-pack-objects[1]. Defaults to 1000.

pack.threads::
Specifies the number of threads to spawn when searching for best
delta matches. This requires that gitlink:git-pack-objects[1]
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.

pull.octopus::
The default merge strategy to use when pulling multiple branches
at once.
Expand Down
8 changes: 8 additions & 0 deletions Documentation/git-pack-objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ base-name::
length, this option typically shrinks the resulting
packfile by 3-5 per-cent.

--threads=<n>::
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=<version>[,<offset>]::
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
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ all::
# If not set it defaults to the bare 'wish'. If it is set to the empty
# string then NO_TCLTK will be forced (this is used by configure script).
#
# Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit
# parallel delta searching when packing objects.
#

GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
@$(SHELL_PATH) ./GIT-VERSION-GEN
Expand Down Expand Up @@ -675,6 +678,11 @@ ifdef NO_MEMMEM
COMPAT_OBJS += compat/memmem.o
endif

ifdef THREADED_DELTA_SEARCH
BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH
EXTLIBS += -lpthread
endif

ifeq ($(TCLTK_PATH),)
NO_TCLTK=NoThanks
endif
Expand Down
Loading

0 comments on commit d225ae5

Please sign in to comment.