[PATCH 1 of 1] Use tag dict code from tags.py

Friedrich Kastner-Masilko face at snoopie.at
Thu Jun 10 11:30:42 CDT 2010


 From Dirkjan Ochtman <dirkjan at ochtman.nl>:
> Nit: please fix this line to have a "bookmarks:" prefix. I'd also
> change the rest of the message, since the method you're using here
> doesn't really have anything to do with tags.py (that it's used there
> would be more useful for the rest of the message).

Thanks for the advice, I'll change that.

 From Benoit Boissinot <bboissin at gmail.com>:
> On the other hand, I'm surprised there's a noticable slowdown, as
> lookup() is heavily used and optimizes the case where it's passed a
> full hex string.
>
> Friedrich, do you benchmark numbers to show the difference with your
> patch applied?

I was surprised, too, but then I am no Python expert and not so deep  
into Mercurial's source code.

As written in the comment of the patch, I've not done scientific  
benchmarking, just compared --time numbers with and without the patch  
applied. It showed a difference from 0.092ms to 0.048ms for a "hg log"  
with 20 bookmarks applied. The repo had about 50 changesets with many  
heads (around 10).

I'll try to come up with a decent benchmark to demonstrate it.

regards,
Fritz




More information about the Mercurial-devel mailing list