sapling/mercurial
Martin von Zweigbergk e9f7136157 treemanifest: lazily load manifests
Most operations on treemanifests already visit only relevant
submanifests. Notable examples include __getitem__, __contains__,
walk/matches with matcher, diff. By making submanifests lazily loaded,
we speed up all these operations.

The lazy loading is achieved by adding a _load() method that gets
defined where we currently eagerly parse the manifest. We make sure to
call it before any access to _dirs, _files or _flags.

Some timings on the Mozilla repo (with flat manifest timings for
reference):

hg cat -r . README.txt: 1.644s -> 0.096s (0.255s)
hg diff -r .^ -r .    : 1.746s -> 0.137s (0.431s)
hg files -r . python  : 1.508s -> 0.146s (0.335s)
hg files -r .         : 2.125s -> 2.203s (0.712s)
2015-04-09 17:14:35 -07:00
..
default.d mergetools: drop incorrect quoting of diffargs variables 2015-01-28 02:28:38 +01:00
help subrepo: update the help text to account for diff -I/-X gitsubrepo support 2015-04-27 20:25:09 -04:00
hgweb webcommands: fix description of manifest default behavior 2015-04-27 19:13:55 -03:00
httpclient style: kill ersatz if-else ternary operators 2015-03-13 17:00:06 -04:00
pure parsers: remove unused dependency on util 2015-04-06 13:59:36 -07:00
templates hgweb: bring back infinite scroll in shortlog of paper style 2015-05-07 07:46:39 +09:00
__init__.py
ancestor.py util: drop alias for collections.deque 2015-05-16 11:28:04 -07:00
archival.py cleanup: use __builtins__.any instead of util.any 2015-05-16 14:30:07 -04:00
base85.c base85: cast Py_ssize_t values to int (issue3481) 2012-06-04 16:59:34 +02:00
bdiff.c bdiff: avoid a memory error on malloc failure 2013-10-30 16:03:42 -05:00
bookmarks.py bookmarks: add i18n hints to bookmark sync states 2015-04-21 21:02:08 -03:00
branchmap.py repoview: move function for computing filtered hash 2015-04-01 18:43:29 -07:00
bundle2.py bundle2: disable ouput capture unless we use http (issue4613 issue4615) 2015-04-28 17:38:02 -07:00
bundlerepo.py bundlerepo: disable filtering of changelog while constructing revision text 2015-04-29 19:47:37 +09:00
byterange.py style: kill ersatz if-else ternary operators 2015-03-13 17:00:06 -04:00
changegroup.py changegroup: drop _changelog and _manifest properties 2015-04-30 16:45:03 -07:00
changelog.py changelog: fix readpending if no pending data exist (issue4609) 2015-04-20 17:16:22 +02:00
cmdutil.py record: fix adding new file with record from within a subdir (issue4626) 2015-04-27 14:02:49 -07:00
commands.py commands: hide formatter option as EXPERIMENTAL, not as DEPRECATED 2015-04-30 22:40:18 +09:00
commandserver.py cmdserver: include pid of server handling requests in hello message 2014-10-18 12:24:50 +09:00
config.py config: give it an includepaths option for looking for config files 2015-05-15 09:04:32 -04:00
context.py merge with stable 2015-05-19 07:17:57 -05:00
copies.py copies: add matcher parameter to copy logic 2015-04-16 11:29:30 -07:00
crecord.py record: change wording for record curses interface 2015-04-21 16:20:43 -07:00
dagparser.py dagparser: use 'next' instead of try/except for default value 2015-05-18 12:22:44 -05:00
dagutil.py style: kill ersatz if-else ternary operators 2015-03-13 17:00:06 -04:00
demandimport.py demandimport: blacklist distutils.msvc9compiler (issue4475) 2014-12-22 17:27:31 -05:00
diffhelpers.c diffhelpers: fix botched return statement from e48d70075d8a 2015-01-28 13:34:20 -05:00
dirs.c dirs.c: pass C string, not Python string, to _finddir() 2015-05-08 14:13:12 -07:00
dirstate.py ignore: use 'include:' rules instead of custom syntax 2015-05-16 16:06:22 -07:00
discovery.py discovery: don't compute allfuturecommon when it won't be used 2015-04-13 09:54:36 -04:00
dispatch.py dispatch: add support for python-flamegraph[0] profiling 2015-04-16 17:12:33 -04:00
dummycert.pem ssl: on OS X, use a dummy cert to trick Python/OpenSSL to use system CA certs 2014-09-26 02:19:48 +02:00
encoding.py util.h: define an enum for normcase specs 2015-04-02 19:17:32 -07:00
error.py hook: raise a more specialized HookAbort exception when a hook fails 2014-11-29 19:13:35 -08:00
exchange.py merge with stable 2015-05-19 07:17:57 -05:00
exewrapper.c exewrapper: adapt for legacy HackableMercurial 2012-08-07 11:04:41 +02:00
extensions.py extensions: clear aftercallbacks after execution (issue4646) 2015-05-06 09:52:10 -07:00
fancyopts.py fancyopts: restore use of callable() since it was readded in Python 3.2 2014-06-23 09:24:16 -04:00
filelog.py filelog: use censored revlog flag bit to quickly check if a node is censored 2015-01-12 15:29:36 -05:00
filemerge.py templater: remove noop calls of parsestring(s, quoted=False) (API) 2015-05-04 10:01:03 +09:00
fileset.py fileset: add a fileset for portable filenames 2015-03-19 21:26:18 -07:00
formatter.py formatter: convert None to json null 2014-09-17 22:34:34 +09:00
graphmod.py dagwalker: drop a useless intermediate variable 2014-10-08 02:43:51 -07:00
hbisect.py util: drop alias for collections.deque 2015-05-16 11:28:04 -07:00
help.py help: also hide options marked EXPERIMENTAL 2015-04-27 15:12:41 -07:00
hg.py bookmarks: rename setcurrent to activate (API) 2015-04-13 22:27:01 -07:00
hook.py hook: drop dedicated catch for 'KeyboardInterrupt' 2015-05-18 15:40:23 -05:00
httpconnection.py httpconnection: drop Python 2.4 specify hack 2015-05-18 16:47:26 -05:00
httppeer.py httppeer: use try/except/finally 2015-05-15 09:57:02 -05:00
i18n.py i18n: cache the result of every gettext call 2014-10-17 13:52:10 -04:00
keepalive.py util: move md5 back next to sha1 and allow to call it without an argument 2014-09-24 16:00:47 +09:00
localrepo.py revert: apply normallookup on reverted file if size isn't changed (issue4583) 2015-04-24 23:52:41 +09:00
lock.py lock: while releasing, unlink lockfile even if the release function throws 2014-10-16 19:15:51 -07:00
lsprof.py profiling: replace '+' markup of nested lines with indentation 2013-02-08 22:54:48 +01:00
lsprofcalltree.py
mail.py mail: drop explicit mail import required by Python 2.4 2015-05-18 16:46:32 -05:00
manifest.c lazymanifest: drop SP before some labels 2015-04-12 07:14:53 -07:00
manifest.py treemanifest: lazily load manifests 2015-04-09 17:14:35 -07:00
match.py ignore: use 'include:' rules instead of custom syntax 2015-05-16 16:06:22 -07:00
mdiff.py mdiff: add helper for making deltas which replace the full text of a revision 2015-01-21 16:35:09 -05:00
merge.py merge: run update hook after the last wlock release 2015-04-29 15:52:31 -04:00
minirst.py help: show all nested subsections of a section with hg help foo.section 2014-10-06 07:35:53 -04:00
mpatch.c mpatch: rewrite pointer overflow checks 2013-12-11 18:33:42 -06:00
namespaces.py revset: mask specific names for named() predicate 2015-02-05 14:45:49 +09:00
node.py
obsolete.py util: drop the 'unpacker' helper 2015-05-18 23:43:36 -05:00
osutil.c osutil: mark end of string with null char, not 0 2015-03-25 16:21:58 -07:00
parser.py parsers: use 'next' instead of try/except 2015-05-18 12:27:15 -05:00
parsers.c parsers: avoid signed integer overflow in calculation of leaf-node index 2015-04-29 23:07:34 +09:00
patch.py record: edit patch of newly added files (issue4304) 2015-04-23 14:27:26 -07:00
pathencode.c pathencode: eliminate signed integer warnings 2014-02-19 13:11:24 -08:00
pathutil.py canonpath: fix infinite recursion 2015-05-12 19:40:45 -05:00
peer.py peer: delete double definition of method peer 2012-07-28 22:36:22 +02:00
phases.py phases: add set per phase in C phase computation 2015-04-01 11:17:17 -07:00
posix.py util: add removedirs as platform depending function 2015-04-11 00:47:09 +09:00
pushkey.py obsolete: add exchange option 2014-10-14 13:26:01 -07:00
pvec.py pvec: replace 'ctx._repo' with 'ctx.repo()' 2015-03-12 23:18:20 -04:00
py3kcompat.py py3kcompat: drop unused export 2014-05-13 15:22:36 -05:00
repair.py repair: avoid string concatenation by + operator 2015-04-25 23:44:53 +09:00
repoview.py cleanup: use __builtins__.any instead of util.any 2015-05-16 14:30:07 -04:00
revlog.py util: drop alias for collections.deque 2015-05-16 11:28:04 -07:00
revset.py revset: map postfix '%' to only() to optimize operand recursively (issue4670) 2015-05-15 22:32:31 +09:00
scmposix.py config: don't read the same config file twice 2014-09-04 21:36:35 +02:00
scmutil.py match: resolve filesets in subrepos for commands given the '-S' argument 2015-05-16 00:36:35 -04:00
scmwindows.py config: don't read the same config file twice 2014-09-04 21:36:35 +02:00
setdiscovery.py cleanup: use __builtins__.all instead of util.all 2015-05-16 14:34:19 -04:00
similar.py
simplemerge.py simplemerge: remove dead code 2014-08-07 12:51:45 -04:00
sshpeer.py sshpeer: more thorough shell quoting 2014-12-29 14:27:02 -06:00
sshserver.py changegroup: rename bundle-related functions and classes 2014-09-02 12:11:36 +02:00
sslutil.py ssl: resolve symlink before checking for Apple python executable (issue4588) 2015-04-04 14:56:18 +09:00
statichttprepo.py statichttprepo: remove wrong getattr ladder 2015-05-18 22:40:16 -04:00
store.py store: add comment in _hashencode with reason for skipping the first 5 chars 2015-05-13 20:36:56 +02:00
strutil.py
subrepo.py archive: always use portable path component separators with subrepos 2015-05-04 22:33:29 -04:00
tagmerge.py filemerge: add internal:tagmerge merge tool 2014-06-26 01:20:25 +02:00
tags.py tags: do not abort if failed to write lock file to save cache 2015-04-17 23:22:58 +09:00
templatefilters.py templatefilters: don't stringify None into "None" 2015-05-10 13:33:51 -04:00
templatekw.py templatekw: rename variable current to active 2015-04-15 08:26:01 -07:00
templater.py templater: strictly parse leading backslashes of '{' (issue4569) (BC) 2015-05-04 10:17:34 +09:00
transaction.py recover: catch any exception, not just Exception 2015-05-18 15:38:24 -05:00
treediscovery.py util: drop alias for collections.deque 2015-05-16 11:28:04 -07:00
ui.py ui: disable revsetaliases in plain mode (BC) 2015-04-30 07:46:54 -07:00
unionrepo.py unionrepo: use pathutil.normasprefix to ensure os.sep at the end of cwd 2015-04-22 23:38:55 +09:00
url.py url: drop awful hack around bug in Python 2.4 2015-05-18 16:51:02 -05:00
util.h util: fix the check for non-C99 compilers (issue4605) 2015-04-20 22:21:57 -05:00
util.py util: drop the 'unpacker' helper 2015-05-18 23:43:36 -05:00
verify.py verify: add a note about a paleo-bug 2015-03-27 15:13:21 -05:00
win32.py win32: 'raise ctypes.WinError' -> 'raise ctypes.WinError()' 2015-03-22 19:08:13 -04:00
windows.py windows: drop Python2.4 specific hack for directory not found handling 2015-05-18 16:33:57 -05:00
wireproto.py wireproto: turn an 'except' into a 'finally' as suggest by the comment 2015-05-18 13:25:07 -05:00
worker.py cleanup: avoid _ for local unused tmp variables - that is reserved for i18n 2014-08-15 16:20:47 +02:00