Re: [Cheetahtemplate-discuss] Importing Cheetah.Template.Template unusually slow?
Brought to you by:
rtyler,
tavis_rudd
From: R. T. B. <ty...@mo...> - 2010-02-02 02:35:30
|
On Tue, 02 Feb 2010, Matthew Beauregard wrote: > > On 28/01/2010, at 3:48 PM, R. Tyler Ballance wrote: > > > > >On Wed, 27 Jan 2010, Matthew Beauregard wrote: > > > >>Hi, > >> > >>I was trying to speed up my CGI, and I worked out that the > >>lion's share of execution time was taken up by the Cheetah > >>import. Is 0.7s unusually slow? Where should I start in trying > >>to speed it up? > > > >After removing the WebWare legacy imports in Cheetah.Servlet, I > >think you > >should see a speed-up in import-time on your machine. Would you > >mind grabbing a > >tarball from GitHub [1] and testing it for me (I don't have a Mac > >handy) to > >verify the fix? > > I just tested this on a 10.5 Mac running Python 2.5.1 and got the > following exception: > > /Library/Python/2.5/site-packages/Cheetah-2.4.2-py2.5.egg/Cheetah/ > NameMapper.py in _isInstanceOrClass(obj=<bound method Member.onLoads > of <__main__.Member object at 0x1abd890>>) Very good, but you're about a day late ;) http://github.com/rtyler/cheetah/commit/62f5a2fe995695c1a88cef5e059192b20143afe0 Your workaround is fine, but you might want to look into why you're not using the compiled namemapper Cheers, -R. Tyler Ballance -------------------------------------- Jabber: rt...@ja... GitHub: http://github.com/rtyler Twitter: http://twitter.com/agentdero Blog: http://unethicalblogger.com |