Mercurial > hg > mercurial-crew-with-dirclash
annotate templates/search.tmpl @ 879:953ccddd57bd
dirstate walking optimizations
The repo walking code introduces a number of calls to dirstate.map.copy(),
significantly slowing down the walk on large trees. When a list of
files is passed to the walking code, we should only look at map entries
relevant to the file list passed in.
dirstate.filterfiles() is added to return a subset of the dirstate map.
The subset includes in files passed in, and if one of the files requested
is actually a directory, it includes any files inside that directory tree.
This brings the time for hg diff Makefile down from 1.7s to .3s on
a linux kernel repo.
Also, the diff command was unconditionally calling makewalk, leading
to an extra pass through repo.changes. This patch avoids the call
to makewalk when commands.diff isn't given a list of patterns, cutting
the time for hg diff (with no args) in half.
Index: mine/mercurial/hg.py
===================================================================
author | mason@suse.com |
---|---|
date | Fri, 12 Aug 2005 07:10:21 -0800 |
parents | 7140bc781655 |
children | 17703aa4491e |
rev | line source |
---|---|
538 | 1 #header# |
2 <title>#repo|escape#: searching for #query|escape#</title> | |
3 </head> | |
4 <body> | |
5 | |
6 <div class="buttons"> | |
7 <a href="?cmd=changelog;rev=#rev#">changelog</a> | |
8 <a href="?cmd=tags">tags</a> | |
9 <a href="?cmd=manifest;manifest=#manifest#;path=/">manifest</a> | |
10 </div> | |
11 | |
12 <h2>searching for #query|escape#</h2> | |
13 | |
14 <form> | |
15 search: | |
16 <input type="hidden" name="cmd" value="changelog"> | |
17 <input name="rev" type="text" width="30" value="#query|escape#"> | |
18 </form> | |
19 | |
20 #entries# | |
21 | |
22 <form> | |
23 search: | |
24 <input type="hidden" name="cmd" value="changelog"> | |
25 <input name="rev" type="text" width="30"> | |
26 </form> | |
27 | |
28 #footer# |