##// END OF EJS Templates
revset: make parents() O(number of parents)...
revset: make parents() O(number of parents) Strip executes a revset like this: max(parents(_intlist('1234\x001235')) - _intlist('1234\x001235')) Previously the parents() revset would do 'subset & parents' which iterates over each item in the subset and checks if it's in parents. subset is usually the entire repo (a spanset) so this takes a while. Reversing the parameters to be 'parents & subset' means the operation becomes O(number of parents) instead of O(size of repo). It also means the result gets evaluated immediately (since parents isn't a lazy set), but I think this is a win in most scenarios. This shaves 0.3 seconds off strip (amend/histedit/rebase/etc) for large repositories. revset #0: parents(20000) 0) obsolete feature not enabled but 54243 markers found! ! wall 0.006256 comb 0.010000 user 0.010000 sys 0.000000 (best of 289) 1) obsolete feature not enabled but 54243 markers found! ! wall 0.000391 comb 0.000000 user 0.000000 sys 0.000000 (best of 4323)

File last commit:

r22450:95af9861 default
r22450:95af9861 default
Show More
revsetbenchmarks.txt
27 lines | 434 B | text/plain | TextLexer
all()
draft()
::tip
draft() and ::tip
::tip and draft()
0::tip
roots(0::tip)
author(lmoscovicz)
author(mpm)
author(lmoscovicz) or author(mpm)
author(mpm) or author(lmoscovicz)
tip:0
max(tip:0)
min(0:tip)
0::
min(0::)
roots((tip~100::) - (tip~100::tip))
::p1(p1(tip))::
public()
:10000 and public()
draft()
:10000 and draft()
max(::(tip~20) - obsolete())
roots((0:tip)::)
(not public() - obsolete())
parents(20000)
(20000::) - (20000)