Skip to content.

plope

Personal tools
You are here: Home » Members » chrism's Home » The Framework Penalty » Looking at the right number
 
 

Comment

Above in this comment thread: The Framework Penalty

Looking at the right number

Posted by tseaver at 2008-02-06 10:31 PM
The important number on your measurement is not requests per second, but
microseconds pre request:

Supervisor, 852 usec / request (mean)

Zope3, 3555 usec / request (mean)

The framework penalty you are seeing here is ~2700 usec / request.
The "usual suspects" in this case are likely:

- Two thread context switches (the initial handoff from the Medusa
mainloop to the application thread, and the handoff from the
application thread back to the mainloop).

- Latency in the Medusa select loop (since the request isn't being
handled immediately on receipt).

- Checking a connection out from the ZODB pool.

- Grabbing the root object from the database connection.

- Doing the publishing traversal lookup for 'ok.html' on the root,
which does an absurd amount of work:

o First, it checks for and calls '__before_publishing_traverse__' on the root object, then looking
up the name 'ok.html' first

Urgh, browser snafu'ed half my comment.

Anyway, the rest went into disgusting detail about the rats nest of the publisher,
and concluded that the amazing thing was getting all that done in just 2700 usec.

I'd like to try an "obob helper" in Repoze which sacrificed BBB for speed for a given
application, just to see how much better we could do.

And then, we'd have to look at the equivalent under CMF / Plone: yet *more* taxes
(might even make the 2700 usec look cheap!)