Show More
@@ -90,7 +90,7 b' def fnoderevs(ui, repo, revs):' | |||||
90 | unfi = repo.unfiltered() |
|
90 | unfi = repo.unfiltered() | |
91 | tonode = unfi.changelog.node |
|
91 | tonode = unfi.changelog.node | |
92 | nodes = [tonode(r) for r in revs] |
|
92 | nodes = [tonode(r) for r in revs] | |
93 |
fnodes = _getfnodes(ui, repo, nodes |
|
93 | fnodes = _getfnodes(ui, repo, nodes) | |
94 | fnodes = _filterfnodes(fnodes, nodes) |
|
94 | fnodes = _filterfnodes(fnodes, nodes) | |
95 | return fnodes |
|
95 | return fnodes | |
96 |
|
96 | |||
@@ -458,7 +458,8 b' def _readtagcache(ui, repo):' | |||||
458 | # This is the most expensive part of finding tags, so performance |
|
458 | # This is the most expensive part of finding tags, so performance | |
459 | # depends primarily on the size of newheads. Worst case: no cache |
|
459 | # depends primarily on the size of newheads. Worst case: no cache | |
460 | # file, so newheads == repoheads. |
|
460 | # file, so newheads == repoheads. | |
461 | cachefnode = _getfnodes(ui, repo, repoheads) |
|
461 | # Reversed order helps the cache ('repoheads' is in descending order) | |
|
462 | cachefnode = _getfnodes(ui, repo, reversed(repoheads)) | |||
462 |
|
463 | |||
463 | # Caller has to iterate over all heads, but can use the filenodes in |
|
464 | # Caller has to iterate over all heads, but can use the filenodes in | |
464 | # cachefnode to get to each .hgtags revision quickly. |
|
465 | # cachefnode to get to each .hgtags revision quickly. | |
@@ -473,7 +474,7 b' def _getfnodes(ui, repo, nodes):' | |||||
473 | starttime = util.timer() |
|
474 | starttime = util.timer() | |
474 | fnodescache = hgtagsfnodescache(repo.unfiltered()) |
|
475 | fnodescache = hgtagsfnodescache(repo.unfiltered()) | |
475 | cachefnode = {} |
|
476 | cachefnode = {} | |
476 |
for node in |
|
477 | for node in nodes: | |
477 | fnode = fnodescache.getfnode(node) |
|
478 | fnode = fnodescache.getfnode(node) | |
478 | if fnode != nullid: |
|
479 | if fnode != nullid: | |
479 | cachefnode[node] = fnode |
|
480 | cachefnode[node] = fnode |
General Comments 0
You need to be logged in to leave comments.
Login now