[PATCH 2 of 2] repoview: bypass changelog method to computed cache key

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Dec 4 18:07:18 CST 2015



On 12/04/2015 03:18 PM, Pierre-Yves David wrote:
>
>
> On 12/04/2015 03:06 PM, Pierre-Yves David wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david at fb.com>
>> # Date 1449267735 28800
>> #      Fri Dec 04 14:22:15 2015 -0800
>> # Node ID 43caa4b5b82cb482a59513ee78b5bd96abefb7cd
>> # Parent  8daa6d98b6f67d39389bbd91d0a034466e1c965d
>> # EXP-Topic clcachekey
>> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
>> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r
>> 43caa4b5b82c
>> repoview: bypass changelog method to computed cache key
>>
>> Getting the data necessary for the cache key using the
>> changelog/revlog method
>> adds a significant overhead. Given how simple the underlying
>> implementation is
>> and often this code is ran, it make sense to violate layering and
>> directly
>> compute the data.
>>
>> Testing `hg log` on Mozilla-central, this reduce the time spent on
>> changelog
>> cache validation by an extra half:
>>
>> before: 12.2s of 69s
>> after:   6.1s of 62s
>>
>> Total speed up from this patch and it's parent is 3x
>>
>> (With stupid python profiler overhead)
>>
>> The global speedup without profiler overhead is still there,
>>
>> Before: 51s
>> After:  39s (-23%)
>
> Disabling my various extensions playing with namespace, the number move to
>
> Before: 33.680
> After:  29.290 (-15%)

I've ran the revsets benchmark on the "author" revsets, speed up of 14% 
to 20% is confirmed there too.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list