Commit Graph

65 Commits

Author SHA1 Message Date
Pierre-Yves David
8dd85d0996 perf: unroll the result in perfrevset
With the new lazy revset implementation, we need to actually read all elements
to trigger all the computations. Otherwise a no-op if of course much faster than
the full work.
2014-03-26 17:25:11 -07:00
Pierre-Yves David
f834b74f49 perf: fix perfvolatilesets
The repoview's `filteredrevs` has been renamed to `filterrevs` at some point.
perf was never informed.
2013-12-23 16:04:51 -08:00
Brodie Rao
aba805d85d perf: add perfmoonwalk command to walk the changelog backwards
This lets us test the effectiveness (or ineffectiveness) of the revlog chunk
cache when walking revlogs backwards.
2013-11-17 18:04:28 -05:00
Augie Fackler
2859ed15ec subsettable: move from repoview to branchmap, the only place it's used
This is a step towards breaking an import cycle between revset and
repoview. Import cycles happened to work in Python 2 with implicit
relative imports, but breaks on Python 3 when we start using explicit
relative imports via 2to3 rewrite rules.
2013-11-06 14:38:34 -05:00
Augie Fackler
2727bcf864 perf: rearrange imports of changelong and manifest to appease check-code 2013-09-20 10:14:59 -04:00
Siddharth Agarwal
10bb361ad4 perfmanifest: allow and require passing in a rev
Previously perfmanifest would only test tip.
2013-09-06 13:35:29 -07:00
Siddharth Agarwal
79b9a1c4e5 perfmanifest: fix cache invalidation
The manifest cache is now stored in _mancache. The revlog cache is still stored
in _cache.
2013-09-06 13:20:07 -07:00
Simon Heimberg
6059e06d0f cleanup: drop unused variables and an unused import 2013-07-01 20:48:56 +02:00
Simon Heimberg
8a32578a00 cleanup: remove unused imports
detected by pyflakes
2013-06-13 01:36:58 +02:00
Durham Goode
94d98a2fbb annotate: simplify annotate parent function
The annotate algorithm used a custom parents() function to try to reuse
filectx and filelogs. I simplified it a bit to rely more heavily on the
self.parents() which makes it work well with alternative filectx
implementations. I tested performance on a file with 5000+ revisions
but no renames, and on a file with 500 revisions repeating a series of
4 edits+renames and saw zero performance hit.  In fact, it was reliably a
couple milliseconds faster now.

Added the perfannotate command to contrib/perf.py for future use.
2013-05-30 19:29:03 -07:00
Siddharth Agarwal
b2115318e7 perf: add a command to test copies.pathcopies perf
An upcoming patch will improve the performance of this function, and this
command will be used to demonstrate that improvement.
2013-04-04 20:36:46 -07:00
Siddharth Agarwal
3d47559133 perf: add a command to test addremove performance
Upcoming patches will improve addremove performance. This command will be used
to demonstrate that improvement.
2013-04-01 23:09:36 -07:00
Bryan O'Sullivan
0c6ba243cb perf: add perfdirs command
This measures the cost of computing the dirstate's dirs structure,
which becomes very expensive in a large working directory.
2013-04-01 13:46:32 -07:00
Bryan O'Sullivan
b9f58e03c3 perf: remove mysterious trailing newlines 2013-03-28 18:21:20 -07:00
Siddharth Agarwal
47a58ca6ee perf: add a command to measure merge.calculateupdates perf
The performance of merge.manifestmerge will be improved in upcoming patches.
This command will be used to demonstrate the improvement.
2013-03-24 17:06:10 -07:00
Mads Kiilerich
5787baee50 spelling: fix some minor issues found by spell checker 2013-02-10 18:24:29 +01:00
Pierre-Yves David
684502f847 perf: add perfbranchmap command
The command times the update of a branchmap from its nearest subset
or from scratch.
2013-01-11 18:39:43 +01:00
Pierre-Yves David
237773b354 perftest: allow selection of volatile set to benchmark
This helps when you focus on a subset of the volatile chain.
2013-01-04 19:24:32 +01:00
Pierre-Yves David
7e392315df perftest: add a command to benchmark construction of volatile cache
Obsolescence and filtering related caches are critical. Having a handy way to
check them is valuable.
2013-01-04 19:23:26 +01:00
Pierre-Yves David
0df9cd0af7 perftest: add an option to invalidate volatile cache
Some revsets are sensitive to such initialization. Being able to
test the impact is great.
2013-01-04 19:22:40 +01:00
Pierre-Yves David
c91dd4609f perftest: document the perfrevset command
I'll add an argument to it.
2013-01-04 19:22:15 +01:00
Pierre-Yves David
220ee90898 perftest: migrate to new style command declaration
Declaring synopsis and argument on the function site is much clearer.
2013-01-04 19:20:51 +01:00
Pierre-Yves David
e7d6dfdf0a perftest: drop duplicated codes
The `perfnodelookup` lookup commands is duplicated. We drop the first version,
overwritten by the seconds.
2013-01-04 19:18:12 +01:00
Siddharth Agarwal
4fdbea480f ancestor: add lazy membership testing to lazyancestors
This also makes the perfancestorset command use lazy membership testing. In a
linear repository with over 400,000 commits, without this patch, hg
perfancestorset takes 0.80 seconds no matter how far behind we're looking.
With this patch, hg perfancestorset -- X takes:

    Rev X       Time
       -1      0.00s
    -4000      0.01s
   -20000      0.04s
   -80000      0.17s
  -200000      0.43s
  -300000      0.69s
        0      0.88s

Thus, for revisions close to tip, we're up to several orders of magnitude
faster. At 0 we're around 10% slower.
2012-12-18 12:47:20 -08:00
Siddharth Agarwal
4e60dda7f4 perf: add command to test performance of membership in ancestor set
The new command, perfancestorset, takes an argument denoting which revset to
test the membership of.

Currently this runs through all the ancestors and converts them into a set.
The primary purpose of having this is to compare this approach, currently used
in several places, against the upcoming lazy approach.
2012-12-14 10:23:18 -08:00
Siddharth Agarwal
678c5756b6 perf: add a command to measure revset performance 2012-12-06 11:21:11 -08:00
Siddharth Agarwal
fed745d00f perf: add option to perfstatus to get the status of unknown files
When status needs to look at unknown files (e.g. when running hg status), it
needs to use a completely different algorithm than when it doesn't (e.g. when
running hg diff).
2012-12-03 13:53:53 -08:00
Adrian Buehlmann
9576bfc817 perf: simply use repo.store for perffncache* commands
This makes sure that .hg/requires is observed and the correct kind of store
object is created. Otherwise we might mutilate our test repos when experimenting
with new repo formats.
2012-10-12 19:43:24 +02:00
Adrian Buehlmann
4c2547f734 perf: add perffncacheencode
Examples (all done with somewhat dated clones I found on my disk):

Netbeans (~120k entries in fncache):

  $ hg perffncacheencode
  ! wall 4.338000 comb 4.336828 user 4.336828 sys 0.000000 (best of 3)

Openoffice (~77k entries in fncache)):

  $ hg perffncacheencode
  ! wall 1.533000 comb 1.528810 user 1.528810 sys 0.000000 (best of 7)

Xen (~10k entries in fncache):

  $ hg perffncacheencode
  ! wall 0.198000 comb 0.187201 user 0.187201 sys 0.000000 (best of 51)

Done on Windows 7 x64.
2012-09-14 13:02:31 +02:00
Joshua Redstone
2118475aca perf: fix perfcca to work with new casecollisionauditor interface
A recent changeset, 66b3a64f7b5e, modified the caescollisionauditor interface
but did not update perf.py.  This changeset remidies that.
2012-07-18 07:51:20 -07:00
Bryan O'Sullivan
6ba97b40c1 revlog: ancestors(*revs) becomes ancestors(revs) (API)
Accepting a variable number of arguments as the old API did is
deeply ugly, particularly as it means the API can't be extended
with new arguments.  Partly as a result, we have at least three
different implementations of the same ancestors algorithm (!?).

Most callers were forced to call ancestors(*somelist), adding to
both inefficiency and ugliness.
2012-06-01 12:37:18 -07:00
Bryan O'Sullivan
167441c211 perf: add a benchmark for revrange 2012-06-01 15:50:22 -07:00
Bryan O'Sullivan
45a54a6b08 perf: add a perfancestors benchmark 2012-05-15 10:44:17 -07:00
Bryan O'Sullivan
7ddd8678d8 perf: add a perfdirstatewrite benchmark 2012-05-16 13:45:46 -07:00
Bryan O'Sullivan
18476b4834 perf: rework perfheads and perftags to clear caches
The cache clearing makes numbers more reproducible.
2012-05-19 19:44:23 -07:00
Brodie Rao
a706d64a2c cleanup: replace naked excepts with except Exception: ... 2012-05-12 16:02:46 +02:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Bryan O'Sullivan
dc46676e81 parsers: use base-16 trie for faster node->rev mapping
This greatly speeds up node->rev lookups, with results that are
often user-perceptible: for instance, "hg --time log" of the node
associated with rev 1000 on a linux-2.6 repo improves from 0.3
seconds to 0.03.  I have not found any instances of slowdowns.

The new perfnodelookup command in contrib/perf.py demonstrates the
speedup more dramatically, since it performs no I/O.  For a single
lookup, the new code is about 40x faster.

These changes also prepare the ground for the possibility of further
improving the performance of prefix-based node lookups.
2012-04-12 14:05:59 -07:00
Bryan O'Sullivan
22e70490ba perf: time fncache read and write performance 2012-04-12 15:21:52 -07:00
Matt Mackall
ebe322955c perf: add case collision auditor perf 2012-04-10 12:07:16 -05:00
Matt Mackall
98ed4dc5e9 perf: node lookup 2012-03-30 14:16:06 -05:00
Matt Mackall
c13dd2e166 perf: add a changeset test 2012-03-16 19:58:47 -05:00
Matt Mackall
cf0424ed5e perf: add perfchangeset to time changeset parsing 2012-03-15 15:58:55 -05:00
Matt Mackall
7fbdc6a514 perf: tweak tests for testing index performance improvements 2012-03-15 13:11:03 -05:00
Matt Mackall
5ab97592f7 scmutil: switch match users to supplying contexts
The most appropriate context is not always clearly defined. The obvious cases:

For working directory commands, we use None
For commands (eg annotate) with single revs, we use that revision

The less obvious cases:

For commands (eg status, diff) with a pair of revs, we use the second revision
For commands that take a range (like log), we use None
2011-06-18 16:52:51 -05:00
Martin Geisler
af8a35e078 check-code: flag 0/1 used as constant Boolean expression 2011-06-01 12:38:46 +02:00
Matt Mackall
0832007f60 scmutil: drop aliases in cmdutil for match functions 2011-05-13 14:58:24 -05:00
Matt Mackall
dc0a2bb9fd perf: restore lazyindex hack
This hack (and the module it lives in) exist so that performance can
be compared across different hg versions.
2011-01-18 15:55:49 -06:00
Benoit Boissinot
0e3e49c93d perf: there is no lazy index anymore 2011-01-15 12:28:10 +01:00
Matt Mackall
186cb7506d perf: fix ordering of invalidate in perfindex 2011-01-12 11:34:42 -06:00