[Twisted-Python] Scaling problem

Itamar Shtull-Trauring itamar at itamarst.org
Tue Nov 4 14:50:45 EST 2003

On Tue, 4 Nov 2003 10:19:31 -0800
"Uwe C. Schroeder" <uwe at oss4u.com> wrote:

> BTW: You might suggest to break down the expensive function into
> smaller pieces - no way. It has to run in one database transaction
> otherwise I might end up with a inconsistent database - no good in
> finance business.

What does this expensive function do? If it's standalone, involves heavy
computation, or blocking resources, running it in a thread pool should
allow you to improve latency. In cases where it goes into C code, it
should also improve performance as it should release the GIL when doing

If that isn't good enough, Quotient has some code for dispatching tasks
to multiple processes.

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

More information about the Twisted-Python mailing list