On Wed, 2007-05-16 at 21:27 +0000, Chris Slowe wrote: > I'm working on a project which is making rather copious use of extends > blocks, and I've noticed that every time an extends block is executed, > django seems to hit the file system, reads the file, and compiles the > parent template. This behavior seems to be independent of whether > that particular parent template has been seen and compiled before. > > I've traced the problem to ExtendsNode in loader_tags.py, where > get_parent is called when render is executed. It seems like the > resulting rendered parent Template object is never cached, so > subsequent hits to render end up reloading the template from file > again.
Is this behaviour a critical slowdown in the performance of your application? There are many micro optimisations that are possible in the template system (including caching pre-compiled templates), but the experience from the original developers was that they simply weren't necessary. It isn't a huge performance hit, in general. If you have performance numbers that show it really is a major component of the time budget for a request on templates that are "reasonable" (not pathological cases), that would be interesting to see so that we could look at what might be necessary. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---