[PATCH 2 of 2] commands: config option to control bundle compression level

Sean Farley sean at farley.io
Wed Jan 11 13:46:36 EST 2017


Gregory Szorc <gregory.szorc at gmail.com> writes:

> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1484076032 28800
> #      Tue Jan 10 11:20:32 2017 -0800
> # Node ID 5afa8b0ba877fd8602b0f8bd3b5949f98d56e90b
> # Parent  82e5f4db873e2e4e01bb5264a5b2cc22781fc4b3
> commands: config option to control bundle compression level
>
> Currently, bundle compression uses the default compression level
> for the active compression engine. The default compression level
> is tuned as a compromise between speed and size.
>
> Some scenarios may call for a different compression level. For
> example, with clone bundles, bundles are generated once and used
> several times. Since the cost to generate is paid infrequently,
> server operators may wish to trade extra CPU time for better
> compression ratios.
>
> This patch introduces an experimental and undocumented config
> option to control the bundle compression level. As the inline
> comment says, this approach is a bit hacky. I'd prefer for
> the compression level to be encoded in the bundle spec. e.g.
> "zstd-v2;complevel=15." However, given that the 4.1 freeze is
> imminent, I'm not comfortable implementing this user-facing
> change without much time to test and consider the implications.
> So, we're going with the quick and dirty solution for now.
>
> Having this option in the 4.1 release will enable Mozilla to
> easily produce and test zlib and zstd bundles with non-default
> compression levels in production. This will help drive future
> development of the feature and zstd integration with Mercurial.

I digested the patches this morning and they seem fine for the
experimental section. Pre-reviewed!


More information about the Mercurial-devel mailing list