config: support new upload_pack_window setting
commit28e700ed1b5a09e40714203254c7420e82338602
authorKyle J. McKay <mackyle@gmail.com>
Thu, 8 Sep 2016 16:55:27 +0000 (8 09:55 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 8 Sep 2016 16:55:27 +0000 (8 09:55 -0700)
treebd52b423cc5705f9a59ac065892f647d740c8045
parent2e8b5078e3f1d35a7f7fb15f4d0465b46f161799
config: support new upload_pack_window setting

When Git is creating a pack to send down to a client, if it needs to
send down objects that are deltas against objects it is not sending and
that it does not know the client already has, it must undelta and
recompute deltas for those objects.  This is the "Compressing objects"
objects phase the client sees during a fetch or clone.

If pack.window is unset the Git default of 10 will be used during these
operations.

Add a new setting $Girocco::Config::upload_pack_window that allows the
pack.window setting to be changed only when running git upload-pack.

Setting the pack.window size to 5 during upload-pack operations can
reduce the time spent in the "Compressing objects" phase by almost half
with very little effect on efficiency.  Setting the pack.window size to
50 during upload-pack operations can guarantee that data sent to clients
is packed approximately just as efficiently as it would be as a result
of running garbage collection but at a cost of increasing the
"Compressing objects" phase runtime by up to 5 times.

While this change adds support for temporarily altering the pack.window
size while git upload-pack is running, it leaves the default for this
new setting set to "undef" which means to leave the pack.window setting
unmolested while git upload-pack is running.  This matches the prior
behavior.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Config.pm
bin/git-daemon-verify
bin/git-http-backend-verify
bin/git-shell-verify
install.sh
shlib.sh