~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4889.4.1.

  • Committer: John Arbash Meinel
  • Date: 2009-12-11 22:28:58 UTC
  • mto: This revision was merged to the branch mainline in revision 4903.
  • Revision ID: john@arbash-meinel.com-20091211222858-7k63etcp980w0y0b
Change the buffering algorithm for ProtocolThree.

Instead of flushing when we have had 100 write calls, flush when we have 1MB.
There are a lot of potential times when we could flush.
osutils.send_all() splits up the request into 64kB chunks. So we could
buffer to 64kB and then call flush. My concern there is for 'rounding'
errors. Where we end up with 65kB and then we have a nice big 64kB
send, and then a tiny 1kB send. Hopefully this will be a little bit better.

Another option which I might try, is to flush at >64kB, but round to a
64kB boundary, and keep any bytes that are past for the future.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: