[PATCH] graphmod: restore generator nature of dagwalker

Patrick Mézard pmezard at gmail.com
Sat Apr 30 07:16:56 CDT 2011


Le 30/04/11 14:11, Idan Kamara a écrit :
> # HG changeset patch
> # User Idan Kamara <idankk86 at gmail.com>
> # Date 1304165458 -10800
> # Node ID 61fe0686f5da8736d1cc87618c6137d7234434f2
> # Parent  bcfe78c3d15c928cd0ab80625c640c81a0ae7d62
> graphmod: restore generator nature of dagwalker
> 
> 9966c95b8c4f introduced the ability to walk the DAG
> given arbitrary revisions, but changed the behaviour of
> it to return a list of all nodes (and create a changectx
> for each one) rather than doing it lazily.
> 
> This has a pretty significant impact on performance for large
> repositories (tested on CPython repo, with output disabled):
> 
>   $ time hg glog
> 
>   real	0m2.642s
>   user	0m2.560s
>   sys	0m0.080s
> 
> Before 9966c95b8c4f:
> 
>   $ time hg glog
> 
>   real	0m0.143s
>   user	0m0.112s
>   sys	0m0.032s
> 
> And after this fix:
> 
>   $ time hg glog
> 
>   real	0m0.213s
>   user	0m0.184s
>   sys	0m0.028s

I will look at this one, thanks.

--
Patrick Mézard


More information about the Mercurial-devel mailing list