[plugin] dirstate experiments
John Arbash Meinel
john at arbash-meinel.com
Thu Jun 15 15:56:31 BST 2006
Robert Collins wrote:
> On Wed, 2006-06-14 at 16:27 -0400, Aaron Bentley wrote:
...
>
> An alternative is to just split the file before and after the hunk that
> changes, and write that out : without any serialisation cost, writing is
> relatively cheap even with a new checksum calculation.
>
> I'm very leery of having data appended at the end at this point: it
> breaks the checksum, and it breaks having bisect-like random access into
> it. (One possible reason to use two delimiters is to allow a bisect
> search into the file to find a single entry, so we dont have to parse a
> (say) 200MB file at all: we only have to parse a few kb's.
>
>
> Rob
>
I agree with the multiple delimiters stuff. I think it will be slightly
slower, but I really prefer that records are bounded with one marker,
and individual content is bounded with a different one.
I actually added a few new fields (like num_entries) in the header so
that I could detected an incorrect parse, and this is much easier to do
if you have multiple delimiters.
I'll play around with it and see how much performance we lose by using
\0 in the inner fields.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060615/38e3a77e/attachment.pgp
More information about the bazaar
mailing list