Patchwork treemanifest: disable readdelta optimization

login
register
mail settings
Submitter Martin von Zweigbergk
Date April 3, 2015, 3:32 a.m.
Message ID <2acc5d6ee6985694b33b.1428031937@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8468/
State Accepted
Headers show

Comments

Martin von Zweigbergk - April 3, 2015, 3:32 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1426006662 25200
#      Tue Mar 10 09:57:42 2015 -0700
# Node ID 2acc5d6ee6985694b33b632596601ead4364e412
# Parent  d7cf8102bf09a905662c1018e60a06e417a08af3
treemanifest: disable readdelta optimization

When tree manifests are stored with one revlog per directory and
loaded lazily, it's unclear how much readdelta will help. If only a
few files change, then only a small part of the full manifest will be
loaded, and the delta chains should also be shorter for tree
manifests. Therefore, let's disable readdelta for tree manifests for
now.
Augie Fackler - April 3, 2015, 2:56 p.m.
On Thu, Apr 02, 2015 at 08:32:17PM -0700, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1426006662 25200
> #      Tue Mar 10 09:57:42 2015 -0700
> # Node ID 2acc5d6ee6985694b33b632596601ead4364e412
> # Parent  d7cf8102bf09a905662c1018e60a06e417a08af3
> treemanifest: disable readdelta optimization

Seems reasonable based on my understanding. Queued, thanks.

>
> When tree manifests are stored with one revlog per directory and
> loaded lazily, it's unclear how much readdelta will help. If only a
> few files change, then only a small part of the full manifest will be
> loaded, and the delta chains should also be shorter for tree
> manifests. Therefore, let's disable readdelta for tree manifests for
> now.
>
> diff -r d7cf8102bf09 -r 2acc5d6ee698 mercurial/manifest.py
> --- a/mercurial/manifest.py	Thu Apr 02 16:51:00 2015 -0500
> +++ b/mercurial/manifest.py	Tue Mar 10 09:57:42 2015 -0700
> @@ -687,7 +687,7 @@
>          return md
>
>      def readdelta(self, node):
> -        if self._usemanifestv2:
> +        if self._usemanifestv2 or self._usetreemanifest:
>              return self._slowreaddelta(node)
>          r = self.rev(node)
>          d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff -r d7cf8102bf09 -r 2acc5d6ee698 mercurial/manifest.py
--- a/mercurial/manifest.py	Thu Apr 02 16:51:00 2015 -0500
+++ b/mercurial/manifest.py	Tue Mar 10 09:57:42 2015 -0700
@@ -687,7 +687,7 @@ 
         return md
 
     def readdelta(self, node):
-        if self._usemanifestv2:
+        if self._usemanifestv2 or self._usetreemanifest:
             return self._slowreaddelta(node)
         r = self.rev(node)
         d = mdiff.patchtext(self.revdiff(self.deltaparent(r), r))