Performance problem 'hg log -v'

Guido Ostkamp hg at ostkamp.fastmail.fm
Wed Sep 12 13:37:44 CDT 2007


On Wed, 12 Sep 2007, Matt Mackall wrote:
> On Tue, Sep 11, 2007 at 10:45:25PM -0700, Jens Alfke wrote:
>>
>> On 11 Sep '07, at 3:03 PM, Guido Ostkamp wrote:
>>
>>> Is there possibly a check
>>> missing and hg searches all revlogs, although it is clear that it is
>>> not
>>> under control?
>>
>> I am totally not an expert, but my guess is that "hg log" has to
>> search all revlogs because there may *in the past* have been a file
>> with that pathname in the repo, but which was then deleted or renamed.
>
> Nope, if there isn't a .hg/store/data/foo.c.i, then there never was a
> foo.c.

Does this mean you can confirm that there is a bug in Mercurial?

I repeated the test case and got some straces of the call. I see thousands 
of repeated call fragments like this one:

18747 open("/home/ostkamp/hg-repositories/repo/.hg/store/00changelog.d", O_RDONLY|O_LARGEFILE)= 5
18747 fstat64(5, {st_mode=S_IFREG|0664, st_size=8991128, ...}) = 0
18747 _llseek(3, 139264, [139264], SEEK_SET) = 0
18747 close(5)                          = 0

strace has 225237 lines and this started about line 2000-3000 or so.

It opens a file, gets metadata, does a positioning, but no read of any 
data, then the file is closed - looks strange to me.

Regards

Guido


More information about the Mercurial-devel mailing list