Philipp von Weitershausen wrote:
Shane Hathaway wrote:
So I fully agree that the original write() should go (in fact I suppose
it's gone already), but to say there was no performance advantage is
imprecise.  I spent a fair amount of time making write() fast, with some

Interesting. Where exactly did this effort of making write() fast go
into? Looking at X3 3.0's response.write() method, I basically see:

    def write(self, string):

So using write() once doesn't at all seem like an advantage over simply
returning the data...

The interesting part is behind the scenes. If the response is large enough (it's an adjustable threshold), the response transparently gets sent to a temporary file. If the load on the server doesn't allow all the responses to fit in RAM, temporary files are an advantage because they allow the kernel to help manage the memory. (CPython's manner of using memory makes it hard for the kernel to page most memory held by Python processes.)

However, as I said earlier, there was only advantage if a lot of conditions were met. Those conditions were often met by Zope Corporation customers.

Zope3-dev mailing list

Reply via email to