Re: Slow templates in py2exe
"R. Tyler Ballance" <[email protected]> Thu, 17 Sep 2009 16:48:34 -0700
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 17 Sep 2009, Aahz wrote: > Cheetah 2.0.1, Python 2.6, CherryPy 3.1.1 Old Cheetah is Old ;) (current is v2.2.2) > 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? My initial instinct is that py2exe is pulling in the Python version of the NameMapper, which is indeed slower than the C version. The NameMapper is what is responsible for mapping $myVar into the actual entity that it represents. Do you have the compiled version of NameMapper installed? Do you know if py2exe is pulling it in? > > 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). Cheers -R. Tyler Ballance Slide, Inc. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® 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-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Cheetahtemplate-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkqyytIACgkQFCbH3D9R4W8S4wCdG26oJlWr3ubz+fbvLeX8/zHx sd8AoIsUPaIqT9JbSbt9RmpVHRTiWLSb =FRW0 -----END PGP SIGNATURE-----