[PATCH 1 of 3] scmutil: support background file closing

Adrian Buehlmann adrian at cadifra.com
Fri Jan 15 03:12:36 CST 2016

On 2016-01-14 22:45, Gregory Szorc wrote:
> +        # There is overhead to starting and stopping the background threads.
> +        # Don't do background processing unless the file count is large enough
> +        # to justify it.
> +        minfilecount = ui.configint('worker', 'backgroundcloseminfilecount',
> +                                    2048)

2048 is too low per my taste...

If you really must inflict this new threading feature per default for
Windows, I'd recommend introducing it with a default minfilecount of
100K (or at least 20K) for now.

This would make sure that thread closing does not kick in per default
for ordinary repos like - for example - Mercurial itself.

Some (rounded) numbers of files for repos found on my disk (the repos
may not be current):

                    .hg/store   working copy

  mozilla-central     231'000        130'000
  openoffice           77'800         69'000
  cpython              10'800          4'200
  mercurial             2'200          1'000
  tortoisehg            1'600              ?

Perhaps, you could provide some timing numbers of the speed gains for a
range of repo sizes. So far, I think you only mentioned your key case
mozilla-central (on special hardware).

More information about the Mercurial-devel mailing list