On Jun 16, 2007, at 4:45 AM, Jürgen Kartnaller wrote:
...
Profiling again showed us that traceback.extract_stack() was still called somewhere.

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 time to

                   !!!!! 2ms !!!!!

Wow!

So we decided to remove this feature.
The change is now in the newest egg for zope.security version 3.4.0b2

Yay!

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

--
Jim Fulton                      mailto:[EMAIL PROTECTED]                Python 
Powered!
CTO                             (540) 361-1714                  
http://www.python.org
Zope Corporation        http://www.zope.com             http://www.zope.org



_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to