Re: Template cache which speeded up my setup 25 times

2006-02-03 Thread Adrian Holovaty
On 2/3/06, hugo <[EMAIL PROTECTED]> wrote: > Or a way for the template loader to tell the machinery that the > template is already compiled? That way a template loader could cache > compiled templates and on access return the compiled template to > Django, instead of the template source? > > I wou

Re: Template cache which speeded up my setup 25 times

2006-02-02 Thread hugo
>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? Or a way for the template loader to tell the machinery that

Re: Template cache which speeded up my setup 25 times

2006-01-25 Thread Adrian Holovaty
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 wo

Re: Template cache which speeded up my setup 25 times

2006-01-25 Thread hugo
>The code is below, all you have to do is call >install_loader_cache() >when your app starts (in the urls perhaps) and use >render_to_response >from this package when rendering output (the default one has >an old >reference to get_template so it won't use the cache until this >feature >gets includ

Template cache which speeded up my setup 25 times

2006-01-25 Thread WSobczuk
Hey, On my hosts doing several hundred requests per second the load was at 100 already, and then Adrian suggested to cache the templates. So I implemented a simple cache (which is now a hack but perhaps it will be included in Django soon) which brought the load down to 5 - so a lot of speedup at