[MERGE][RFC] Add simple revision serializer based on RIO.
Alexander Belchenko
bialix at ukr.net
Mon May 11 08:44:13 BST 2009
Andrew Bennetts пишет:
> 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.
In the past I wrote Pyrex extension for bencode. But it was rejected by
Aaron, because its benefits was not clearly visible at that time.
>
> 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