[PATCH] revlog: teach revlog to construct a revision from parentdeltas

Pradeepkumar Gayam in3xes at gmail.com
Sun Aug 8 08:03:44 UTC 2010


On Sat, Aug 7, 2010 at 8:28 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Sat, 2010-08-07 at 12:00 +0530, in3xes at gmail.com wrote:
> > # HG changeset patch
> > # User Pradeepkumar Gayam <in3xes at gmail.com>
> > # Date 1281138500 -19800
> > # Node ID 12a41d114b113af32329386b32d88709c0f28816
> > # Parent  db0f8a9594be4ecde3c1cc0ba71087997650ca9a
> > revlog: teach revlog to construct a revision from parentdeltas
>
> Ok, this versions passes tests when I force parentdelta (with expected
> breakage in debugindex), and it also passes verify on convert. But it
> doesn't pass verify as a benchmark (the first one I reached for):
>
> # stable hg on non-delta repo
> $ time hgs verify
> checking changesets
> checking manifests
> crosschecking files in changesets and
> manifests
> checking files
> 1555 files, 11766 changesets, 23269 total
> revisions
>
> real    0m11.670s
> user    0m11.033s
> sys     0m0.290s
>
> # default branch without your patches on non-delta repo
> $ time hg -R hg2 verify
> checking changesets
> checking manifests
> crosschecking files in changesets and
> manifests
> checking files
> 1555 files, 11766 changesets, 23269 total
> revisions
>
> real    0m11.225s
> user    0m10.929s
> sys     0m0.247s
>
> # hg with your patches on non-delta repo
> $ time hg verify
> checking changesets
> checking manifests
> crosschecking files in changesets and
> manifests
> checking files
> 1555 files, 11766 changesets, 23269 total
> revisions
>
> real    0m16.802s
> user    0m16.472s
> sys     0m0.213s
>
>
# hg with your patch on delta repo
> $ time hg -R p2 verify
> checking changesets
> checking manifests
> crosschecking files in changesets and
> manifests
> checking files
> 1555 files, 11766 changesets, 23269 total
> revisions
>
> real    0m49.717s
> user    0m48.773s
> sys     0m0.383s
>
> In this case, if we debug index of manifest the reason is clear, the
distance between two base is increasing as it goes new revisions. That
increases the number of patches to process. Hence decrease in performance.
We can see this  http://paste.lisp.org/display/111974  The number of patches
to process increases to 4digit number in the end of the list. I tried
decreasing distance between bases by inserting full revisions frequently.
That gave fruitful results but not much encouraging.

>
> We obviously can't take these patches if it makes verify of existing
> repos 50% slower. And 5x slower when parentdelta is actually enabled
> isn't great either. FYI, the slowness appears with this patch.
>

> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20100808/a6d2e673/attachment.html>


More information about the Mercurial-devel mailing list