[PATCH] Speed up manifest parsing by 4x
Matt Mackall
mpm at selenic.com
Wed Mar 26 17:32:12 UTC 2008
On Wed, 2008-03-26 at 12:17 -0500, Steve Borho wrote:
> On Wed, 2008-03-26 at 09:47 -0700, Bryan O'Sullivan wrote:
> > Bryan O'Sullivan wrote:
> >
> > >> We should probably do our own unhexing. Then we don't have to construct
> > >> a separate Python string object just to then convert it to binary.
> > >
> > > That will probably help performance, yes.
> >
> > FWIW, it almost doubled performance, making the new manifest parser
> > almost 8x as fast as the pure Python version.
>
> Which commands does that help the most? log, annotate?
Anything that instantiates a manifest. Like, um, hg manifest.
Most things go out of their way -not- to do that, as it's about the most
expensive data structure in Mercurial to load. The worst case for this
is probably log --debug, which loads the manifest to calculate which
files were added or removed.
What Bryan doesn't mention is that now simply simply uncompressing the
manifest from the revlog dominates, so there's still work to do here.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list