sapling/hgext
Yuya Nishihara ba69ca47d4 pathauditor: disable cache of audited paths by default (issue5628)
The initial attempt was to discard cache when appropriate, but it appears
to be error prone. We had to carefully inspect all places where audit() is
called e.g. without actually updating filesystem, before removing files and
directories, etc.

So, this patch disables the cache of audited paths by default, and enables
it only for the following cases:

 - short-lived auditor objects
 - repo.vfs, repo.svfs, and repo.cachevfs, which are managed directories
   and considered sort of append-only (a file/directory would never be
   replaced with a symlink)

There would be more cacheable vfs objects (e.g. mq.queue.opener), but I
decided not to inspect all of them in this patch. We can make them cached
later.

Benchmark result:

- using old clone of http://selenic.com/repo/linux-2.6/ (38319 files)
- on tmpfs
- run HGRCPATH=/dev/null hg up -q --time tip && hg up -q null
- try 4 times and take the last three results

original:
real 7.480 secs (user 1.140+22.760 sys 0.150+1.690)
real 8.010 secs (user 1.070+22.280 sys 0.170+2.120)
real 7.470 secs (user 1.120+22.390 sys 0.120+1.910)

clearcache (the other series):
real 7.680 secs (user 1.120+23.420 sys 0.140+1.970)
real 7.670 secs (user 1.110+23.620 sys 0.130+1.810)
real 7.740 secs (user 1.090+23.510 sys 0.160+1.940)

enable cache only for vfs and svfs (this series):
real 8.730 secs (user 1.500+25.190 sys 0.260+2.260)
real 8.750 secs (user 1.490+25.170 sys 0.250+2.340)
real 9.010 secs (user 1.680+25.340 sys 0.280+2.540)

remove cache function at all (for reference):
real 9.620 secs (user 1.440+27.120 sys 0.250+2.980)
real 9.420 secs (user 1.400+26.940 sys 0.320+3.130)
real 9.760 secs (user 1.530+27.270 sys 0.250+2.970)
2017-07-26 22:10:15 +09:00
..
convert bookmark: use 'applychanges' in the convert extension 2017-07-10 17:30:20 +02:00
fsmonitor pathauditor: disable cache of audited paths by default (issue5628) 2017-07-26 22:10:15 +09:00
highlight highlight: put pygments import inside demandimport.deactivated 2017-06-18 23:05:54 -04:00
largefiles codemod: register core configitems using a script 2017-07-14 14:22:40 -07:00
zeroconf zeroconf: blindly forward extra argument to the core config method 2017-07-01 21:57:17 +02:00
__init__.py hgext: officially turn 'hgext' into a namespace package 2016-02-27 12:56:26 +01:00
acl.py configitem: create a new list of each 'acl.sources' access 2017-07-02 23:10:33 +02:00
amend.py amend: new extension providing the amend command 2017-07-11 20:53:55 -07:00
automv.py configitems: register the 'automv.similarity' config 2017-06-30 03:27:24 +02:00
blackbox.py repovfs: add a ward to check if locks are properly taken 2017-07-11 12:38:17 +02:00
bugzilla.py bugzilla: move the default regexp for fix in the config declaration 2017-07-14 16:17:37 +02:00
censor.py revlog: rename constants (API) 2017-05-17 19:52:18 -07:00
children.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
churn.py churn: use the non-deprecated template option in the examples 2017-05-08 23:05:01 -04:00
clonebundles.py clonebundles: fix missing newline character 2017-05-24 22:59:59 -04:00
commitextras.py commitextras: make sure keys are not empty 2017-07-30 12:19:46 +05:30
eol.py eol: import 'error' as 'errormod' 2017-06-23 13:24:45 +02:00
extdiff.py cmdutil: rename template param to export to fntemplate 2017-05-20 20:15:05 -04:00
factotum.py configitems: register the 'factotum.service' config 2017-06-30 03:42:15 +02:00
fetch.py fetch: remove shorthand of --edit colliding against -e/-ssh in remoteopts (BC) 2017-06-24 02:39:13 +09:00
gpg.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
graphlog.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
hgk.py hgk: don't use mutable default argument value 2017-03-14 23:48:25 -07:00
histedit.py bookmark: use 'applychanges' when updating bookmark in histedit 2017-07-10 17:28:53 +02:00
journal.py codemod: register core configitems using a script 2017-07-14 14:22:40 -07:00
keyword.py keyword: wrap functions only once at loading keyword extension 2017-06-26 03:47:11 +09:00
logtoprocess.py logtoprocess: use lowercase for docstring title 2017-03-23 21:16:55 -07:00
mq.py bookmark: use 'applychanges' in the mq extension 2017-07-10 17:44:25 +02:00
notify.py cmdutil: pass templatespec tuple directly to changeset_templater (API) 2017-04-22 19:02:47 +09:00
pager.py pager: if old pager extensions is enabled, respect pager.attend 2017-03-13 21:43:17 -07:00
patchbomb.py repovfs: add a ward to check if locks are properly taken 2017-07-11 12:38:17 +02:00
purge.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
rebase.py rebase: sort collapsed revisions in commit message (issue5643) 2017-08-02 21:52:22 +09:00
record.py commands: move templates of common command options to cmdutil (API) 2017-05-14 16:19:47 +09:00
releasenotes.py releasenotes: add custom admonitions support for release notes 2017-07-18 23:04:08 +05:30
relink.py extensions: change magic "shipped with hg" string 2016-08-23 11:26:08 -04:00
schemes.py schemes: use br'' literal to define bytes regexp 2017-03-09 19:41:40 -08:00
share.py bookmark: deprecate 'recordchange' in favor of 'applychanges' 2017-07-10 20:10:03 +02:00
shelve.py dirstate: update backup functions to take full backup filename 2017-07-12 15:24:07 -07:00
show.py show: document why accidentally quadratic is (probably) acceptable 2017-07-03 21:26:39 -07:00
sparse.py sparse: require [section] in sparse config files (BC) 2017-07-15 13:21:23 -07:00
strip.py bookmark: use 'applychanges' when stripping 2017-07-10 17:37:48 +02:00
transplant.py transplant: directly use repo.vfs.join 2017-03-08 16:52:49 -08:00
win32mbcs.py win32mbcs: avoid unintentional failure at colorization 2017-05-31 23:44:33 +09:00
win32text.py win32text: directly use repo.vfs.join 2017-03-08 16:52:57 -08:00