mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
revset-matching: call 'getset' on a 'fullreposet'
Calling 'baseset(repo.changelog)' builds a list for all revisions in the repo. And we already have the lazy and efficient 'fullreposet' class for this purpose. This gives us the usual benefits of the fullreposet but it is less visible because the matching process itself is very expensive: revset) matching(100) before) wall 6.413281 comb 6.420000 user 5.910000 sys 0.510000 (best of 3) after) wall 6.173608 comb 6.170000 user 5.750000 sys 0.420000 (best of 3) However for some complex list, this provide a massive speedup revset) matching(parents(100)) before) wall 23.890740 comb 23.890000 user 23.450000 sys 0.440000 (best of 3) after) wall 6.382280 comb 6.390000 user 5.930000 sys 0.460000 (best of 3)
This commit is contained in:
parent
7b5edd0cf5
commit
515b17f5ef
@ -1383,7 +1383,7 @@ def matching(repo, subset, x):
|
||||
# i18n: "matching" is a keyword
|
||||
l = getargs(x, 1, 2, _("matching takes 1 or 2 arguments"))
|
||||
|
||||
revs = getset(repo, baseset(repo.changelog), l[0])
|
||||
revs = getset(repo, fullreposet(repo), l[0])
|
||||
|
||||
fieldlist = ['metadata']
|
||||
if len(l) > 1:
|
||||
|
Loading…
Reference in New Issue
Block a user