[PATCH 2 of 4] log: do not walk the entire revision window when it's bigger than required

Benoit Boissinot benoit.boissinot at ens-lyon.org
Mon Apr 26 07:53:52 CDT 2010


On Mon, Apr 26, 2010 at 12:06:10PM +0900, Nicolas Dumazet wrote:
> # HG changeset patch
> # User Nicolas Dumazet <nicdumz.commits at gmail.com>
> # Date 1272014685 -32400
> # Node ID d16d31df0b0dfba503fc1f68b8eb32df59ed396d
> # Parent  093655bea24814baf545b76ff154accfdc49d1c4
> log: do not walk the entire revision window when it's bigger than required
> 
> When a [minrev, maxrev] revision interval is required, we first walk forward
> the filelog in a windowed manner, accumulating revisions, and then yield those
> revisions in reversed order.
> We used to forward-walk the full filelog, not using the revision range
> information; and then filter revisions matching the range during the second
> step.
> 
> We can, however, use the "maxrange" hint during the first step, to stop our
> forward-walk early. Depending on the size of the current window, it saves us
> 8 to 512 filelog node reads.

Does it work with "crossed" linkrevs? (linkrev are not guaranteed to be
monotonic)

Or was it already "broken"?

Benoit

-- 
:wq


More information about the Mercurial-devel mailing list