Mercurial > hg > mercurial-crew-with-dirclash
annotate templates/filediff.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 | dbe0ce2ae196 |
children | 17703aa4491e |
rev | line source |
---|---|
142 | 1 #header# |
201
f918a6fa2572
hgweb: add template filters, template style maps, and raw pages
mpm@selenic.com
parents:
172
diff
changeset
|
2 <title>#repo|escape#: #file# diff</title> |
142 | 3 </head> |
4 <body> | |
138 | 5 |
154
1d5f799ebe1e
fixed problem with head/body tags, added dtd, fixed table attributes
jake@edge2.net
parents:
153
diff
changeset
|
6 <div class="buttons"> |
153
e8a360cd5a9f
changed pos to rev for changelog cmd, changed & to ;
jake@edge2.net
parents:
142
diff
changeset
|
7 <a href="?cmd=changelog;rev=#rev#">changelog</a> |
168 | 8 <a href="?cmd=tags">tags</a> |
153
e8a360cd5a9f
changed pos to rev for changelog cmd, changed & to ;
jake@edge2.net
parents:
142
diff
changeset
|
9 <a href="?cmd=changeset;node=#node#">changeset</a> |
e8a360cd5a9f
changed pos to rev for changelog cmd, changed & to ;
jake@edge2.net
parents:
142
diff
changeset
|
10 <a href="?cmd=file;file=#file#;filenode=#filenode#">file</a> |
e8a360cd5a9f
changed pos to rev for changelog cmd, changed & to ;
jake@edge2.net
parents:
142
diff
changeset
|
11 <a href="?cmd=filelog;file=#file#;filenode=#filenode#">revisions</a> |
e8a360cd5a9f
changed pos to rev for changelog cmd, changed & to ;
jake@edge2.net
parents:
142
diff
changeset
|
12 <a href="?cmd=annotate;file=#file#;filenode=#filenode#">annotate</a> |
201
f918a6fa2572
hgweb: add template filters, template style maps, and raw pages
mpm@selenic.com
parents:
172
diff
changeset
|
13 <a href="?cmd=filediff;file=#file#;node=#node#;style=raw">raw</a> |
142 | 14 </div> |
138 | 15 |
16 <h2>#file#</h2> | |
17 | |
602 | 18 <table id="filediffEntry"> |
138 | 19 <tr> |
602 | 20 <th class="revision">revision #rev#:</th> |
21 <td class="revision"><a href="?cmd=changeset;node=#node#">#node|short#</a></td> | |
22 </tr> | |
571
c7364b985ca2
[PATCH 3/5]: cleaning the template parent management in hgweb
mpm@selenic.com
parents:
377
diff
changeset
|
23 #parent# |
138 | 24 </table> |
25 | |
672
dbe0ce2ae196
More IE friendly diff output related templates.
Edouard Gomez <ed.gomez@free.fr>
parents:
602
diff
changeset
|
26 <div id="fileDiff"> |
138 | 27 #diff# |
602 | 28 </div> |
138 | 29 |
142 | 30 #footer# |
138 | 31 |
32 |