Code review comment for lp:~ian-clatworthy/bzr/faster-diff2

Martin Pool (mbp) wrote :

2009/5/28 John A Meinel <email address hidden>:
> If I was to personally give a direction for this, it would be to create
> a new iter_changes-like operation, which returns real objects with
> attributes back to the calling code. (An initial skin could just wrap
> iter_changes() into real objects.)
> And along with those objects, you could then add "get me more
> information", which could include stuff like caching in the dirblock
> entry, to quickly return extra info.

I agree.

>
> If you feel the overhead is in 'bisect' time, then we should look at
> where that bisect is being done. I would much rather have a 'location
> hint' cache at the dirstate level, which would seed the bisect search.
> So when iter_changes finds something interesting about ('foo', 'bar',
> 'baz') it can then set the cache hint, so that a lookup of ('foo',
> 'bar') knows right where to find the object. I would also design it so
> that it grabs that entry, checks if it is correct. If not, it
> invalidates the entry (possibly the whole cache?) and then does the
> normal bisect.

I agree with that too, and the 4-point plan.

--
Martin <http://launchpad.net/~mbp/>

« Back to merge proposal