BundleReader cannot stream
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Vincent was trying to get rid of our ugly kludge in HTTPTranpsort.get() which wraps the returned socket in a cStringIO.
We needed that because other code expected to be able to seek() on files. Originally, we needed this because gzip.GzipFile() needed to seek() on the files it was decompressing. I believe we changed that with tuned_gzip, and even so, we now use readv() and then wrap parts of the data in a StringIO (rather than all of the data).
The only place that we see (at the moment) that needs seek() capability is in our Bundle code. Specifically, when you call read_bundle_
Our current serializers assume that they can seek(0) to start parsing the file from scratch.
What would seem to be the best, is to update the meta-code to read line by line, and then pass the parsed header down to the serializer so that it doesn't need to seek.
Changed in bzr: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Changed in bzr: | |
status: | Triaged → Confirmed |
tags: | added: check-for-breezy |