[rfc] [patch] trivial patch to speed up bzr log

Martin Pool mbp at sourcefrog.net
Fri Jan 13 00:51:37 GMT 2006


On 12 Jan 2006, Denys Duchier <duchier at ps.uni-sb.de> wrote:
> before the patch:
> 
>      $ time bzr log NEWS >/dev/null
>      
>      real       4m36.264s
>      user       4m21.360s
>      sys        0m2.072s
> 
> after the patch:
> 
>      $ time bzr.cleanup log NEWS >/dev/null
>      
>      real       2m43.820s
>      user       2m39.778s
>      sys        0m1.421s
> 
> 
> The trick is simply to cache in the weave object the last extracted revision.
> This matches exactly the extraction pattern occurring during "bzr log".

+1 from me, that looks reasonable and quite useful.  

The best test I can think of to accompany this would be to try getting
the same revision repeatedly and check that it works, as does getting
A,B,A,B.  But this is probably well covered by tests for log, etc.

log could possibly be improved a bit more by caching the parsed revision
and inventory objects.

Thanks
-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060113/3a285df2/attachment.pgp 


More information about the bazaar mailing list