#2175: mako template performance problems
----------------------------------+-----------------------------------------
 Reporter:  tvrtko.sokolovski     |        Owner:  faide
     Type:  enhancement           |       Status:  new  
 Priority:  high                  |    Milestone:  2.0b6
Component:  TurboGears            |      Version:  trunk
 Severity:  normal                |   Resolution:       
 Keywords:  mako cache profiling  |  
----------------------------------+-----------------------------------------
Comment (by kikidonk):

 I can reproduce the problem, and it lies in the Dotted-template lookup
 loader.

 If you use use_dotted_templatenames = False, mako will be very fast
 (modulo bug #2192).

 The problem seems to be:
 * http://trac.turbogears.org/browser/trunk/tg/configuration.py#L292 The
 DottedTemplateLookup does an open().read() each time a template is invoked
 via get_template which can happen a lot (via includes/inherits, etc)
 * DottedTemplateLookup doesn't implement the same caching mechanism as the
 Mako's TemplateLookup (which has a TemplateCollection, and doesn't
 actually read the template content until needed, and also uses the
 precompiled template). I beleive DottedTemplateLookup never actually
 compiles and re-uses compiled templates.

 I guess DottedTemplateLookup should inherit from mako's TemplateLookup and
 override only the needed parts to transform the dotted name in file name

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2175#comment:4>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to