[PATCH 3 of 3] manifest: postpone calling array.array() until needed
Martin von Zweigbergk
martinvonz at google.com
Fri Feb 27 22:56:20 CST 2015
On Fri, Feb 27, 2015 at 3:57 PM Matt Mackall <mpm at selenic.com> wrote:
> On Thu, 2015-02-26 at 16:02 -0800, Martin von Zweigbergk wrote:
> > # HG changeset patch
> > # User Martin von Zweigbergk <martinvonz at google.com>
> > # Date 1424802971 28800
> > # Tue Feb 24 10:36:11 2015 -0800
> > # Node ID 1d3fe60a20d4f6284bc295af27f9f272af30dcdd
> > # Parent ef7dde10dc5941491a19dbd17ccb47a776f0dadd
> > manifest: postpone calling array.array() until needed
> > We currently convert a string to an array in manifest.read(), only to
> > store the result in the manifest cache. In most cases, the array will
> > not be used, so let's store the original string instead. Storage cost
> > should be similar assuming strings are stored in memory as byte
> > arrays. The only disadvantage should be that the conversion can be
> > done several times if multiple new revisions are created based on the
> > same cached revision.
> I've dropped this one because it looks like it de-optimized back-to-back
> commits, for instance of the sort done by pushing a stack of mq patches.
I see the problem now. Sorry, I should have caught that.
It was a tangent to my other work, so I won't attempt a V2.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel