A Scalable, User-Friendly Source Control System.
Go to file
Gregory Szorc d1e95ae39b bundle2: inline struct operations
Before, we were calling struct.unpack() (via an alias) on every
loop iteration. I'm not sure what Python does under the hood, but
it would have to look at the struct format and determine what to
do.

This commit establishes a struct.Struct instance and reuses it for
struct reading.

We can see the impact from running `hg perfbundleread` on a Firefox
bundle:

! read(8k)
! wall 0.679730 comb 0.680000 user 0.140000 sys 0.540000 (best of 15)
! read(16k)
! wall 0.577228 comb 0.570000 user 0.080000 sys 0.490000 (best of 17)
! read(32k)
! wall 0.516060 comb 0.520000 user 0.040000 sys 0.480000 (best of 20)
! read(128k)
! wall 0.496378 comb 0.490000 user 0.010000 sys 0.480000 (best of 20)
! bundle2 iterparts()
! wall 3.056811 comb 3.050000 user 2.340000 sys 0.710000 (best of 4)
! wall 2.992605 comb 2.990000 user 2.260000 sys 0.730000 (best of 4)
! bundle2 iterparts() seekable
! wall 4.007676 comb 4.000000 user 3.170000 sys 0.830000 (best of 3)
! wall 3.863810 comb 3.860000 user 3.000000 sys 0.860000 (best of 3)
! bundle2 part seek()
! wall 6.267110 comb 6.250000 user 3.480000 sys 2.770000 (best of 3)
! wall 6.213387 comb 6.200000 user 3.350000 sys 2.850000 (best of 3)
! bundle2 part read(8k)
! wall 3.404164 comb 3.400000 user 2.650000 sys 0.750000 (best of 3)
! wall 3.241099 comb 3.250000 user 2.560000 sys 0.690000 (best of 3)
! bundle2 part read(16k)
! wall 3.197972 comb 3.200000 user 2.490000 sys 0.710000 (best of 4)
! wall 3.003930 comb 3.000000 user 2.270000 sys 0.730000 (best of 4)
! bundle2 part read(32k)
! wall 3.060557 comb 3.060000 user 2.340000 sys 0.720000 (best of 4)
! wall 2.904695 comb 2.900000 user 2.160000 sys 0.740000 (best of 4)
! bundle2 part read(128k)
! wall 2.952209 comb 2.950000 user 2.230000 sys 0.720000 (best of 4)
! wall 2.776140 comb 2.780000 user 2.070000 sys 0.710000 (best of 4)

Profiling now says most remaining time is spent in util.chunkbuffer.
I already heavily optimized that data structure several releases ago.
So we'll likely get little more performance out of bundle2 reading
while still retaining util.chunkbuffer().

Differential Revision: https://phab.mercurial-scm.org/D1393
2017-11-13 21:54:46 -08:00
contrib bundle2: don't use seekable bundle2 parts by default (issue5691) 2017-11-13 21:10:37 -08:00
doc build: make install in "/doc" failed if the destination dir contained spaces 2017-10-11 01:19:48 +02:00
hgdemandimport demandimportpy3: update to pass import checker 2017-08-22 14:14:34 -04:00
hgext lfs: register config options 2017-11-14 01:03:22 -05:00
hgext3rd extensions: also search for extension in the 'hgext3rd' package 2016-03-11 10:30:08 +00:00
i18n merge with i18n 2017-11-01 16:07:33 -04:00
mercurial bundle2: inline struct operations 2017-11-13 21:54:46 -08:00
tests sshpeer: add a configurable hint for the ssh error message 2017-11-20 01:40:26 -08:00
.clang-format clang-format: configuration for the clang-format source formatter 2015-01-24 17:04:25 -05:00
.editorconfig mercurial: add editorconfig 2016-04-05 18:10:33 +01:00
.hgignore merge with stable 2017-06-24 15:50:13 -04:00
.hgsigs Added signature for changeset f1d5a55d6a57 2017-11-07 13:15:35 -05:00
CONTRIBUTING contributing: add new file with a pointer to the wiki 2016-10-08 10:39:00 -04:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
hg dispatch: move initialization of sys.std* files 2017-10-02 07:18:24 +01:00
hgeditor spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgweb.cgi urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Makefile makefile: put format-c into .PHONY targets 2017-10-26 11:58:55 +08:00
README.rst doc: rename README to README.rst 2017-09-26 08:37:17 +02:00
setup.py setup: add hgext.lfs to list of Python packages 2017-11-20 18:00:02 -05:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.