[RFC] Allow KnitVersionedFile to track a cached text
John Arbash Meinel
john at arbash-meinel.com
Sat Jan 20 06:27:34 GMT 2007
Robert Collins wrote:
> On Fri, 2007-01-19 at 16:19 -0600, John Arbash Meinel wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> The attached patch changes KnitVersionedFile so that it has the
>> possibility to cache the last text inserted. The idea is that when doing
>> a bulk conversion you can set this flag and it will cache the last
>> inserted text in memory, rather than having to extract it by applying a
> ...
>
> Dont we have that already? The return value of insertion is an opaque
> structure that can be used on the next insertion to avoid internal
> overhead.
>
> -Rob
True, but you have to pass it around a *lot*. There is no way to do it
using the standard Tree.commit() interface.
So if I was bypassing all of that, and writing directly to knits, then I
could use it.
All this does is if set to true, the Knit keeps a copy of the last
"opaque value". Which gets replaced by the next one.
So yes, we do have it. But *using* it is difficult. My patch makes it
fairly easy to handle a very common case.
I'm not sure it should be integrated into mainline (hence RFC). But
something like this could be useful when doing big conversions.
John
=:->
More information about the bazaar
mailing list