[PATCH 1 of 2 censor RFC v2] changegroup: clean up misnamed local variable in delta generation logic

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Mar 4 23:26:24 UTC 2015



On 02/25/2015 04:26 PM, Matt Mackall wrote:
> On Fri, 2015-02-20 at 16:54 -0500, Mike Edgar wrote:
>> # HG changeset patch
>> # User Mike Edgar <adgar at google.com>
>> # Date 1424465057 18000
>> #      Fri Feb 20 15:44:17 2015 -0500
>> # Node ID 96a3db818b2ec56f420c677ca38ea34dc46af9ff
>> # Parent  75f94dcf76fdfeaebeaaea279ca5b88e3bc8a20b
>> changegroup: clean up misnamed local variable in delta generation logic
>>
>> The actual changegroup delta that is produced is sometimes split across two
>> variables, "prefix" and "delta"; othertimes, it is wholly contained in
>> "delta". This is confusing and inhibits extension of this logic.
>
> The reason for the original code is that sometimes a snapshot was, say,
> 1G.. and adding 12 bytes to it meant 2G peak memory use (not to mention
> some memcpy overhead). The split yield kept us at 1G, this brings us
> back to 2.

I would like to point that the content of mpm email would make a lovely 
in code comment to be left for the new refactor-adventurer.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list