On Sat, 2007-12-22 at 23:00 -0800, Rob Hudson wrote:
[...]
> I wonder if the template system has become a bit more complex since
> then. I also wonder if whatever tests they used included things like
> includes in for loops. I tend to think that the filesystem is slow
> and anything to remove
Template loader returns a source code for template, not parsed
Template object. So no big gain here :(
> In the early days of Django, Adrian, Simon et al looked at that. It
> wasn't worth it, since, in the grand scheme of things, template caching
> and checking the cache wasn't that much faster
Hi.
In production environment IMHO it really doesn't matter because you
have to restart server anytime you change the python code. If you
treat templates as code that really doesn't matter. We have about 50
production servers and we restart a farm every time we change the
code. We do it
On 12/23/07, Eratothene <[EMAIL PROTECTED]> wrote:
> Your snippet requires to restart django each time the templates have
> changed. Did you try to add checking of template file modification
> date in order automatically invalidate cache? What it is performance
> of such implementation? Adding
Hi forgems!
Your snippet requires to restart django each time the templates have
changed. Did you try to add checking of template file modification
date in order automatically invalidate cache? What it is performance
of such implementation? Adding this kind of mechanism will increase
performace
Hi, i'm author of the snippet http://www.djangosnippets.org/snippets/507/.
I have used simple dictionary because pickling and unpickling values
from the cache are IMHO to expensive and don't give a big speed boost
over parsing. Also if you use memcache or filesystem backend for
caching (pretty
On 12/21/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> In the early days of Django, Adrian, Simon et al looked at that. It
> wasn't worth it, since, in the grand scheme of things, template caching
> and checking the cache wasn't that much faster than loading and parsing,
> particularly in
On Tue, 2007-12-18 at 15:47 +0100, Michael Elsdörfer wrote:
> James Bennett schrieb:
> > Manually call get_template() or select_template(), and stuff the
> > resulting Template object into a module-global variable somewhere.
> > Then just re-use it, calling render() with different contexts, each
On Dec 21, 2007 4:50 PM, SmileyChris <[EMAIL PROTECTED]> wrote:
>
> After reading this thread the other day, I decided to write up a patch
> [1].
>
> [1] http://code.djangoproject.com/ticket/6262
Of course you did. Always with the patches. :)
P.S. Thank you
Michael Trier
blog.michaeltrier.com
On 12/18/07, Michael Elsdörfer <[EMAIL PROTECTED]> wrote:
> James Bennett schrieb:
> > Manually call get_template() or select_template(), and stuff the
> > resulting Template object into a module-global variable somewhere.
> > Then just re-use it, calling render() with different contexts, each
>
James Bennett schrieb:
> Manually call get_template() or select_template(), and stuff the
> resulting Template object into a module-global variable somewhere.
> Then just re-use it, calling render() with different contexts, each
> time you need it.
Is there anything speaking against building
Manually call get_template() or select_template(), and stuff the
>resulting Template object into a module-global variable somewhere.
>Then just re-use it, calling render() with different contexts, each
>time you need it.
Along those lines, I recently noticed this bit of code that swaps the
On Dec 17, 2007 4:03 PM, Rob Hudson <[EMAIL PROTECTED]> wrote:
> If I understand correctly, these cache the templates after they have
> been rendered. What I'm curious about is if there is a way to cache
> templates before they are rendered so you can provide different
> contexts to them. It
Rob Hudson schrieb:
> If I understand correctly, these cache the templates after they have
> been rendered. What I'm curious about is if there is a way to cache
> templates before they are rendered so you can provide different
> contexts to them. It seems like there would still be some gains
On 12/17/07, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> http://www.djangoproject.com/documentation/cache/
If I understand correctly, these cache the templates after they have
been rendered. What I'm curious about is if there is a way to cache
templates before they are rendered so you can
http://www.djangoproject.com/documentation/cache/
On 17 дек, 23:49, "Rob Hudson" <[EMAIL PROTECTED]> wrote:
> Howdy,
>
> A thought occurred to me today and I'm not 100% sure what Django does
> by default...
>
> Similar to the idea that PHP parses scripts for each request and
> having an opcode
Howdy,
A thought occurred to me today and I'm not 100% sure what Django does
by default...
Similar to the idea that PHP parses scripts for each request and
having an opcode cache can increase performance, I'm wondering if
Django reads templates from the file system, parses them, and then
does
17 matches
Mail list logo