[PATCH] log: make file log slow path usable on large repos

Durham Goode durham at fb.com
Thu Sep 12 14:38:48 CDT 2013


On 9/11/13 7:43 PM, "Matt Mackall" <mpm at selenic.com> wrote:

>On Tue, 2013-09-10 at 19:52 -0700, Durham Goode wrote:
>> # HG changeset patch
>> # User Durham Goode <durham at fb.com>
>> # Date 1378867774 25200
>> #      Tue Sep 10 19:49:34 2013 -0700
>> # Node ID 73303bff81aaa188c0113791f0147f9e13a9eef8
>> # Parent  c821473150d2cc0c75c74a0292e9a060eb19bc36
>> log: make file log slow path usable on large repos
>>
>> Running "hg log <pattern or directory>" on large repos took a very,
>>very long
>> time because it first read ctx.files() for every commit before even
>>starting to
>> process the results.
>> 
>> This change makes the ctx.files() check lazy, which makes the command
>>start
>> producing results immediately.
>
>For future reference, I desperately want to kill ALL of the old log code
>in favor of the faster, cleaner revset-based version that's in the
>graphlog code. So continuing to collect legacy log code tweaks make me
>sad.
>
>As it happens, the thing blocking dropping the old code is making revset
>computation lazy, which would bring this and many other wins.

I'll take a look at that next time I'm in the area. This is patch is a
pretty significant win for us though, so I'd like to get it in anyway.



More information about the Mercurial-devel mailing list