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

Durham Goode durham at fb.com
Wed Sep 11 12:46:10 CDT 2013


On 9/10/13 11:25 PM, "Nikolaj Sjujskij" <sterkrig at myopera.com> 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.
>Sounds like somehow related to issue 4002 ("hg log FILE is slow") [1]
>Probably would help issue 3948 ("`log --patch` is very slow")[2] as well
>
>[1]: http://bz.selenic.com/show_bug.cgi?id=4002
>[2]: http://bz.selenic.com/show_bug.cgi?id=3948
>

The code I changed only affects hg log when a directory or pattern is
passed.  I don't think those bugs will be helped by this change
unfortunately.



More information about the Mercurial-devel mailing list