[mod_python] Anyone using Cheetah for templating?

courtney ludwin courtneyludwin at yahoo.com
Thu Aug 12 15:06:38 EDT 2004


I still think something is not right,
I am able to fill a cheetah template well over 1000
times a second (just wrote a script to test this out),
and I know mod_python is fast so I think that it is
more of a configuration issue... 

Cheetah is fast when filling templates, but slow to
load templates therefore it may be a importing issue,
but I don't see how in my code, I am only importing
the template once:

example handler:
#---------------------------------------------------------
from ads.tmpl.index import index
from common.ui import navigation as nav
from mod_python import apache
                                                      
                         
def handler(req, sesh):
        tmpl = index(searchList=[{
                "sesh": sesh,
                "site_nav":
nav.get_site_nav("adhome"),
                "ad_nav": nav.get_ad_nav("adhome")}])
        return apache.OK, tmpl
#---------------------------------------------------------



--- Nick <nick at dd.revealed.net> wrote:

> courtney ludwin wrote:
> > The reason I ask is that I have not been able to
> get
> > mp+cheetah to perform well together even after
> > compiling templates.  On my P3-933 w/ 1Gig of ram
> I
> > can serve ~10 pages/sec using Cheetah and ~200
> > pages/sec NOT using Cheetah.  
> 
> That doesn't sound completely unreasonable for a
> benchmark figure (i.e. 
> constantly hitting the server with simultaneous
> requests and driving up the 
> CPU).  My benchmarks typically don't even do that
> well, with say 10 clients 
> and 0 delay between each request.
> 
> Nick
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
>
http://mailman.modpython.org/mailman/listinfo/mod_python
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 


More information about the Mod_python mailing list