[PATCH] do binary search for -r date:....
Robert Collins
robertc at robertcollins.net
Sat May 20 00:38:54 BST 2006
On Sat, 2006-05-20 at 00:58 +0200, Robert Widhopf-Fenk wrote:
> The current implementation does a linear search to find
> the specified date, which is dead slow for a tree with
> may revisions.
>
> The attached patch does a binary search to find it.
>
> Actually "branch.repository.get_revision" is responsible for
> the slowness. I really wonder why it is that slow to get
> a revision from a local storage ... is it really reading the
> knit index for each call to "branch.repository.get_revision"?
Yes, if no read or write lock has been taken out.
Probably the search routine should take out a read lock around the
search.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060520/21254370/attachment.pgp
More information about the bazaar
mailing list