Mercurial > hg-stable
comparison hgext/churn.py @ 24939:85544a52ee84
revset: use an iterator instead of a dequeue in ancestors()
The dequeue was actually just used to be able to pop value one at a time.
Building the dequeue means we are reading all the input value at once at the
beginning of the evaluation. This defeat the lazyness of revset.
We replace the deque with iterator usage for the sake of simplicity and
lazyness.
This provide massive speedup to get the first result if the input set is big
max(::all())
before) wall 0.001917 comb 0.000000 user 0.000000 sys 0.000000 (best of 1115)
after) wall 0.000107 comb 0.000000 user 0.000000 sys 0.000000 (best of 22222)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 26 Mar 2014 16:21:30 -0700 |
parents | 73b3218bb078 |
children | fd7287f0b43c |
comparison
equal
deleted
inserted
replaced
24938:6db8074f9150 | 24939:85544a52ee84 |
---|