Mercurial > hg-stable
changeset 17256:707cbbf950ea stable
tags: visit new heads in forward order when rebuilding cache
This improves performance of building the tag cache by 4x on a repo
with ~2800 heads.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jul 2012 17:04:01 -0500 |
parents | 3e856d8abe9c |
children | d9626b91623a |
files | mercurial/tags.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/tags.py Fri Jul 27 13:56:19 2012 +0200 +++ b/mercurial/tags.py Thu Jul 26 17:04:01 2012 -0500 @@ -241,7 +241,7 @@ # This is the most expensive part of finding tags, so performance # depends primarily on the size of newheads. Worst case: no cache # file, so newheads == repoheads. - for head in newheads: + for head in reversed(newheads): cctx = repo[head] try: fnode = cctx.filenode('.hgtags')