[MERGE/RFC] Use _read_records_iter_unchecked in _get_remaining_record_stream.

Andrew Bennetts andrew.bennetts at canonical.com
Fri Mar 6 00:50:40 GMT 2009


Hi all,

I did a little bit of the profiling of the time spent in the
Repository.get_stream RPC with Robert, and we saw 16% of the time was due
knit record header parsing.  Uncompressing and parsing those headers is
basically wasted effort, at least for the network, because we don't use that
data, we just send the raw bytes on the wire.

So this patch changes _get_remaining_record_stream to call
_read_records_iter_unchecked rather than _read_records_iter_raw, to skip the
header parsing.

I'm interested to know what the other developers think... is it reasonable
to be a bit more lax about checking the data we get out of a repository is a
parseable knit record?  Ideally the target repository would be checking it
as it inserts it anyway (although I don't think this happens today).

-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_record_stream-speedup-4083.patch
Type: text/x-diff
Size: 3214 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090306/c774d6b7/attachment.bin 


More information about the bazaar mailing list