[MERGE][RFC] Add simple revision serializer based on RIO.
Andrew Bennetts
andrew.bennetts at canonical.com
Mon May 11 07:27:10 BST 2009
Martin Pool wrote:
[...]
> However, before moving to RIO for future formats (and I say this
> having added the code) I would think hard about whether it should use
> bencode instead, which has the advantage of being able to represent
> somewhat more complex nesting (like dicts inside dicts) without
> needing a separate layer of encoding on top. Revisions are pretty
> simple but even there it may be useful. I'm not sure about the
> relative performance.
I'm not sure that the current bencode.py is particularly speedy, but it
would be easy to write a C accelerator if we wanted. The HPSS code would
benefit from an improved bencode module too, which would be a nice
side-effect.
The other drawback to the current bencode.py is that its error reporting is
pretty abysmal, but that shouldn't matter much. I'd be interested to see a
size comparison of RIO vs. bencode for a serialised revision. I suspect
that they're fairly close, although the length-prefixes on strings that make
bencode easier to parse may reduce cross-revision compressability (but only
on strings that vary... so perhaps not!).
In short: I think it's worth experimenting with.
-Andrew.
More information about the bazaar
mailing list