On Jun 16, 2007, at 4:45 AM, Jürgen Kartnaller wrote:
Profiling again showed us that traceback.extract_stack() was still
Finally we found it in zope.security.manager.py
newInteraction was storing a traceback to be able to print a nice
traceback in case newInteraction is called a second time. This is
really a good thing for the developer because you get a very
detailed error report which shows you exactly from where
newInteraction was called the first time.
But for which price:
Removing the extraction of the traceback put down the publisher
!!!!! 2ms !!!!!
So we decided to remove this feature.
The change is now in the newest egg for zope.security version 3.4.0b2
With this new version I also measured the time with zope as a trunk
checkout (no eggs involved).
The publisher is now twice as fast as it was before !
I'm writing this just to show everyone what can happen if not
enough care is taken in really critical parts inside the zope core.
newInteraction is called exactly once for each request but was
taking 50% of the time (without eggs) for the publisher.
Nice analysis job!
Jim Fulton mailto:[EMAIL PROTECTED] Python
CTO (540) 361-1714
Zope Corporation http://www.zope.com http://www.zope.org
Zope3-dev mailing list