[plugin] dirstate experiments

Robert Collins robertc at robertcollins.net
Thu Jun 15 12:19:34 BST 2006


On Wed, 2006-06-14 at 16:27 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> John Arbash Meinel wrote:
> > At this point I'm running into the time it takes to do 60k additions,
> > and 20k list.appends().
> > So I don't think there is much more room for improvement.
> 
> Here's a thought for the update-single-entry case:
> The file could end with an unsorted, append-only portion, whose values
> overrode the values in the main section.
> 
> This would allow us to update single entries with the moral equivalent
> of: file('dirstate', 'ab').write('my new values')
> 
> Obviously, we'd want to re-sort the file fairly often, because a large
> append-only section would hurt performance.

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

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060615/a062ab36/attachment.pgp 


More information about the bazaar mailing list