Mercurial > hg
view doc/README @ 40030:62160d3077cd
cborutil: change buffering strategy
Profiling revealed that we were spending a lot of time on the
line that was concatenating the old buffer with the incoming data
when attempting to decode long byte strings, such as manifest
revisions.
Essentially, we were feeding N chunks of size len(X) << len(Y) into
decode() and continuously allocating a new, larger buffer to hold
the undecoded input. This created substantial memory churn and
slowed down execution.
Changing the code to aggregate pending chunks in a list until we
have enough data to fully decode the next atom makes things much
more efficient.
I don't have exact data, but I recall the old code spending >1s
on manifest fulltexts from the mozilla-unified repo. The new code
doesn't significantly appear in profile output.
Differential Revision: https://phab.mercurial-scm.org/D4854
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 03 Oct 2018 09:43:01 -0700 |
parents | 3516a4e877c1 |
children |
line wrap: on
line source
Mercurial's documentation is kept in reStructuredText format, which is a simple plain text format that's easy to read and edit: http://docutils.sourceforge.net/rst.html It's also convertible to a variety of other formats including standard UNIX man page format and HTML. You'll need to install Docutils: http://docutils.sourceforge.net/ Use the Makefile in this directory to generate the man and HTML pages.