Commit holds 2 copies of compressed content
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
At the moment, commit reads 1 full text, then uses zlib.compress() on that. It then ends up copying that compressed text again, in order to finish the commit.
Bug #566940 has more details (though now slightly outdated).
The basics are that we have a few places in the code that add header information to the content stream before they write the content. And to saves syscalls, we do that by concatenating then writing. Instead, we should try to do that with 'chunked' content streams.
So instead of doing:
def data_with_
my_header = '%s %s' % (stuff)
return my_header + content
using
def data_with_
new_content = ['%s %s' % (stuff)]
new_content.
return new_content
tags: | added: check-for-breezy |