On 1/25/06, hugo <[EMAIL PROTECTED]> wrote:
> You might have written this as a simple template loader - and used the
> basic template loaders as starting point, just overloading the
> get_template functionality. That way you would be able to use the
> standard render_to_xxx functions - you only would have to change the
> TEMPLATE_LOADERS setting. And that way integration with the Django core
> is quite simple, as it is just another bunch of template loaders the
> user can just activate.

I'm not sure that would work, because I suspect much of the
performance savings Wojtek is getting is from the fact that his patch
caches *compiled* templates, not the raw template code. (He has a
template that loads another template within a loop.) I don't see how a
template loader -- in the TEMPLATE_LOADERS framework -- would be able
to cache compiled templates.

I was thinking we could add a CACHE_COMPILED_TEMPLATES setting and
change get_template() to give it a "cache" keyword argument, which
would default to the value of CACHE_COMPILED_TEMPLATES. Any quick
thoughts before I implement this?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to