Mercurial > hg
annotate contrib/revsetbenchmarks.txt @ 20894:04e1596d5dbd
revset: improve _descendants performance
Previously revset._descendants would iterate over the entire subset (which is
often the entire repo) and test if each rev was in the descendants list. This is
really slow on large repos (3+ seconds).
Now we iterate over the descendants and test if they're in the subset.
This affects advancing and retracting the phase boundary (3.5 seconds down to
0.8 seconds, which is even faster than it was in 2.9). Also affects commands
that move the phase boundary (commit and rebase, presumably).
The new revsetbenchmark indicates an improvement from 0.2 to 0.12 seconds. So
future revset changes should be able to notice regressions.
I removed a bad test. It was recently added and tested '1:: and reverse(all())',
which has an amibiguous output direction. Previously it printed in reverse order,
because we iterated over the subset (the reverse part). Now it prints in normal
order because we iterate over the 1:: . Since the revset itself doesn't imply an
order, I removed the test.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 25 Mar 2014 14:10:01 -0700 |
parents | c2a81aa19980 |
children | 1d7a2771aa36 |
rev | line source |
---|---|
20777
77318d3c3b24
benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20754
diff
changeset
|
1 all() |
20744
9907b3f79ac2
contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff
changeset
|
2 draft() |
20777
77318d3c3b24
benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20754
diff
changeset
|
3 ::tip |
20744
9907b3f79ac2
contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff
changeset
|
4 draft() and ::tip |
20777
77318d3c3b24
benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20754
diff
changeset
|
5 0::tip |
20744
9907b3f79ac2
contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff
changeset
|
6 roots(0::tip) |
9907b3f79ac2
contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff
changeset
|
7 author(lmoscovicz) |
20777
77318d3c3b24
benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20754
diff
changeset
|
8 author(mpm) |
20744
9907b3f79ac2
contrib: added revset examples for benchmarking performance
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff
changeset
|
9 author(lmoscovicz) or author(mpm) |
20777
77318d3c3b24
benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20754
diff
changeset
|
10 tip:0 |
20754
f15ff553b762
revset: changed minrev and maxrev implementations to use ordered sets
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20744
diff
changeset
|
11 max(tip:0) |
f15ff553b762
revset: changed minrev and maxrev implementations to use ordered sets
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20744
diff
changeset
|
12 min(0:tip) |
20777
77318d3c3b24
benchmark-revset: add full version of benchmarked revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
20754
diff
changeset
|
13 0:: |
20754
f15ff553b762
revset: changed minrev and maxrev implementations to use ordered sets
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
20744
diff
changeset
|
14 min(0::) |
20894
04e1596d5dbd
revset: improve _descendants performance
Durham Goode <durham@fb.com>
parents:
20861
diff
changeset
|
15 roots((tip~100::) - (tip~100::tip)) |
20861
c2a81aa19980
revsetbenchmark: add entry for ::rev::
Gregory Szorc <gregory.szorc@gmail.com>
parents:
20777
diff
changeset
|
16 ::p1(p1(tip)):: |