[Twisted-Python] Memory usage in large file transfers

Itamar Shtull-Trauring itamar at itamarst.org
Tue Dec 2 13:33:37 EST 2003

On Tue, 2 Dec 2003 19:04:49 +0200
"Nikolaos Krontiris" <nkrontir at hotmail.com> wrote:

> nk: Ok, I can give it a try, sounds like a good idea. But, since
> producers have transport.write in their cores anyway, why should there
> be a performance difference between this solution and the way I'm
> using it (just calling transport.write)?

Because it only writes (if you do it correctly and don't just ignore
producer callbacks) when the transport buffers are empty and writes will
go out over the network immediately, so data doesn't accumulate in the
transport buffers (which can be expensive if it gets too big).

Itamar Shtull-Trauring    http://itamarst.org/
Available for Python & Twisted consulting

More information about the Twisted-Python mailing list