A Scalable, User-Friendly Source Control System.
Go to file
Bryan O'Sullivan a150198558 store: implement fncache basic path encoding in C
(This is not yet enabled; it will be turned on in a followup patch.)

The path encoding performed by fncache is complex and (perhaps
surprisingly) slow enough to negatively affect the overall performance
of Mercurial.

For a short path (< 120 bytes), the Python code can be reduced to a fairly
tractable state machine that either determines that nothing needs to be
done in a single pass, or performs the encoding in a second pass.

For longer paths, we avoid the more complicated hashed encoding scheme
for now, and fall back to Python.

Raw performance: I measured in a repo containing 150,000 files in its tip
manifest, with a median path name length of 57 bytes, and 95th percentile
of 96 bytes.

In this repo, the Python code takes 3.1 seconds to encode all path
names, while the hybrid C-and-Python code (called from Python) takes
0.21 seconds, for a speedup of about 14.

Across several other large repositories, I've measured the speedup from
the C code at between 26x and 40x.

For path names above 120 bytes where we must fall back to Python for
hashed encoding, the speedup is about 1.7x.  Thus absolute performance
will depend strongly on the characteristics of a particular repository.
2012-09-18 15:42:19 -07:00
contrib perf: add perffncacheencode 2012-09-14 13:02:31 +02:00
doc spelling: Structured 2012-08-17 13:58:19 -07:00
hgext rebase: ensure rebase does not revive extinct revision 2012-09-18 23:32:42 +02:00
i18n merge with stable 2012-09-13 14:33:10 -05:00
mercurial store: implement fncache basic path encoding in C 2012-09-18 15:42:19 -07:00
tests rebase: ensure rebase does not revive extinct revision 2012-09-18 23:32:42 +02:00
.hgignore hgignore: ignore zip files 2012-07-29 09:03:51 +02:00
.hgsigs Added signature for changeset 6f24a67844f4 2012-09-01 12:49:43 -05: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 rename util.set_binary to setbinary 2011-05-06 15:25:35 +02:00
hgeditor Fixed a bashism with the use of $RANDOM in hgeditor. 2010-05-19 18:06:35 +02:00
hgweb.cgi mq: add a warning about uncommitted changes for qfinish 2011-11-10 15:40:34 -06:00
Makefile Makefile: add build_hgexe -i for local 2012-06-29 13:12:35 +02:00
README readme: mention how to run in-place 2012-03-02 21:43:55 +02:00
setup.py pathencode: new C module with fast encodedir() function 2012-09-18 11:43:30 +02: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 http://mercurial.selenic.com/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.