Next steps for discovery

Benoit Boissinot bboissin at gmail.com
Sun Mar 13 09:06:23 CDT 2011


On Sun, Mar 13, 2011 at 3:00 PM, Martin Geisler <mg at lazybytes.net> wrote:
> Peter Arrenbrecht <peter.arrenbrecht at gmail.com> writes:
>
>> Benoit and I just discussed what we want to do for discovery next:
>>
>> 5. If we do need to sample from the bottom, see how we can speed up
>> the current implementation, maybe by introducing a cache for
>> descendant information.
>
> Perhaps it is already enough to do a rough sampling from the bottom
> based only on revision numbers. Something like:
>
>    steps = [2**i for i in range(5)]
>    samples = set(bottom)
>    for b in bottom:
>        samples.update([b + step for step in steps])

In all cases, we should keep in mind that our scheme allow further
optimizations on the client side. So we can first have a very crude
sampling, which already improves a lot, and later see if it makes
sense to have more clever sampling (possibly trading CPU for
roundtrips).

cheers,

Benoit


More information about the Mercurial-devel mailing list