Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Jul 2017 15:13:09 -0400] rev 33175
test-rebase-interruptions: stabilize for Windows
External hooks end up launching cmd.exe, which knows nothing about $VAR syntax.
For some reason, I thought that Mercurial would substitute in the value, in
order to paper over the platform difference. But I can't find that in the
documentation, and there's at least one other use of this pattern [1].
[1] https://www.mercurial-scm.org/repo/hg/file/tip/tests/test-histedit-fold.t#l477
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Jun 2017 23:15:09 -0700] rev 33174
drawdag: inline transaction() function
I suspect Jun wrote the method before he learnt that Python 2.7 allows
multiple context managers in a single with-clause.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 25 Jun 2017 12:41:34 -0700] rev 33173
revlog: C implementation of delta chain resolution
I've seen revlog._deltachain() appear in a number of performance
profiles. I suspect there are 2 reasons for this:
1. Delta chain resolution performs many index lookups, thus triggering
population of index tuples. Creating possibly tens of thousands of
PyObject will have overhead.
2. Delta chain resolution is a tight loop.
By moving delta chain resolution to C, we can defer instantiation
of full index entry tuples and make the loop faster courtesy of
not running in Python.
We can measure the impact to delta chain resolution via
`hg perflogrevision` using the mozilla-central repo with a recent
manifest having delta chain length of 33726:
$ hg perfrevlogrevision -m 364895
! full
! wall 0.367585 comb 0.370000 user 0.340000 sys 0.030000 (best of 27)
! wall 0.357581 comb 0.360000 user 0.350000 sys 0.010000 (best of 28)
! deltachain
! wall 0.010644 comb 0.010000 user 0.010000 sys 0.000000 (best of 270)
! wall 0.000292 comb 0.000000 user 0.000000 sys 0.000000 (best of 8729)
$ hg perfrevlogrevision --cache -m 364895
! deltachain
! wall 0.003904 comb 0.000000 user 0.000000 sys 0.000000 (best of 712)
! wall 0.000284 comb 0.000000 user 0.000000 sys 0.000000 (best of 9926)
The first test measures savings from both not instantiating index
entries and moving to C. The second test (which doesn't clear the
index caches) essentially isolates the benefits of moving from Python
to C. It still shows a 13.7x speedup (versus 36.4x). And there are
multiple milliseconds of savings within the critical path for resolving
revision data. I think that justifies the existence of C code.
A more striking example of the benefits of this change can be
demonstrated by timing `hg debugdeltachain -m` for the mozilla-central
repo:
$ time hg debugdeltachain -m > /dev/null
before: 1057.4s
after: 503.3s
PyPy2.7 5.8.0: 220.0s
It's worth noting that the C code isn't as optimal as it could be.
We're still instantiating a new PyObject for every revision. A future
optimization would be to reuse the PyObject on the cached index tuple.
We could potentially also get wins by using a memory array of raw
integers. There is also room for a delta chain cache on revlog
instances. Of course, the best optimization is to implement revlog
reading outside of Python so Python doesn't need to be concerned
about the relatively expensive index entries and operations on them.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:36 +0200] rev 33172
config: register the 'devel.strip-obsmarkers' config
The single explicit default that existed so far is converted to registered
config value.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:28 +0200] rev 33171
config: register the 'devel.serverrequirecert' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:18 +0200] rev 33170
config: register the 'devel.serverexactprotocol' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:32:07 +0200] rev 33169
config: register the 'devel.servercafile' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:18 +0200] rev 33168
config: register the 'devel.disableloaddefaultcerts' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:31:05 +0200] rev 33167
config: register the 'devel.check-relroot' config
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 28 Jun 2017 13:37:59 +0200] rev 33166
config: register the devel.check-locks config