Hi, Am Samstag, den 10.03.2007, 07:36 +0100 schrieb Dieter Maurer:
Christian Theune wrote at 2007-3-7 22:05 +0100:
... If 5 seconds are spend in the application thread to untangle mime data which has nothing application-specific about it and then only 100ms or so in the application itself, I'd say there is a major overhead problem.
But if the IO thread spends 5 seconds, then Zope will be unresponsive for 5 seconds -- for me (and hopefully others, too) a far more critical situation than a (single) worker spending 5 seconds...
The IO (ZServer) thread should only perform minimal work in its "asyncore" callbacks -- each callback should return within a few milliseconds.
My argument does not argue against different threads between the IO thread and the worker threads, just against giving the IO thread significant work (whether or not you consider it application specific).
Ah. Maybe I didn't point this out enough. I was thinking about switching to a "chunk-based" approach on processing the request. That way I want to avoid having to process large file data twice. IMHO a variation of the FieldStorage could be implemented that processes the data line by line as it comes in. That would avoid the 5 sec. delay if you process it at once and should not be a problem in the IO thread. Christian -- gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - ct@gocept.com - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development