Slow templates in py2exe

Aahz <[email protected]> Thu, 17 Sep 2009 16:43:39 -0700
Newsgroups gmane.comp.python.cheetah
Organization The Cat & Dragon
Message-ID <[email protected]>
Cheetah 2.0.1, Python 2.6, CherryPy 3.1.1

I'm having a weird problem where Cheetah templates on Windows XP (and
probably Vista, but haven't tested yet) are more than a hundred times
slower inside an app built with py2exe.  This slowdown is not observed
with either raw or compiled templates run from outside the build, and Mac
built with py2app also works fine.

Any clues?  Ideas for places to look?

Yes, literally more than a hundred times slower; a page that takes less
than a second to display outside the build can take several minutes
inside the .EXE, with CPU pegged at 100%.  I have verified with logging
statements that it's TMPL.respond() that's the problem.  The problem is
linear on the size of the generated output (i.e. a for loop with more
iterations takes longer).
-- 
Aahz ([email protected])           <*>         http://www.pythoncraft.com/

"I won't accept a model of the universe in which free will, omniscient
gods, and atheism are simultaneously true."  --M

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf