[PATCH] revlog: avoid an expensive string copy

Matt Mackall mpm at selenic.com
Sat Apr 14 17:16:27 CDT 2012


On Thu, 2012-04-12 at 20:28 -0700, Bryan O'Sullivan wrote:
> # HG changeset patch
> # User Bryan O'Sullivan <bryano at fb.com>
> # Date 1334287593 25200
> # Node ID 409f3f8b9879abb3e51d03eeaba076a18dafcccc
> # Parent  a232a1b5ae9b0b3e9469d1567e36a6c42f6563e3
> revlog: avoid an expensive string copy

I've queued a repaired and expanded version of this for default..

>              return d[cachestart:cacheend]
> +            return buffer(d, cachestart, cacheend - cachestart)

Something wrong here in particular.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list