Re: [Django] #6262: Cache templates

2013-02-14 Thread Django
#6262: Cache templates
-+-
   Reporter:  SmileyChris|Owner:  mmalone
   Type: |   Status:  closed
  Component:  Template system|  Version:  master
   Severity: |   Resolution:  fixed
   Keywords: | Triage Stage:  Design
  Has patch:  1  |  decision needed
Needs tests:  0  |  Needs documentation:  0
 |  Patch needs improvement:  0
-+-

Comment (by Ramiro Morales ):

 In [changeset:"6f29147488e14555ae2e7c56f0f74996010e97e3"]:
 {{{
 #!CommitTicketReference repository=""
 revision="6f29147488e14555ae2e7c56f0f74996010e97e3"
 [1.5.x] Fixed #19729 -- Removed leftover refactoring helper variables.

 Thanks chrismedrela for the report.

 Refs #6262, 44b9076 and 4d94c0c.

 826d9de00e74a53d7cc65fcb2aaa5ccdf33674ab from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #6262: Cache templates

2013-02-04 Thread Django
#6262: Cache templates
-+-
   Reporter:  SmileyChris|Owner:  mmalone
   Type: |   Status:  closed
  Component:  Template system|  Version:  master
   Severity: |   Resolution:  fixed
   Keywords: | Triage Stage:  Design
  Has patch:  1  |  decision needed
Needs tests:  0  |  Needs documentation:  0
 |  Patch needs improvement:  0
-+-

Comment (by Ramiro Morales ):

 In [changeset:"826d9de00e74a53d7cc65fcb2aaa5ccdf33674ab"]:
 {{{
 #!CommitTicketReference repository=""
 revision="826d9de00e74a53d7cc65fcb2aaa5ccdf33674ab"
 Fixed #19729 -- Removed leftover refactoring helper variables.

 Thanks chrismedrela for the report.

 Refs #6262, 44b9076 and 4d94c0c.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #6262: Cache templates

2009-11-20 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 Replying to [comment:36 akaihola]:
 > Replying to [comment:34 mmalone]:
 > > Er, I changed it so the 's' is inside the backticks, which is
 apparently how it's done elsewhere in the docs. Woot!
 >
 > Actually, I meant to point out the missing word "multiple" (or
 "several").
 Sorry, good call. Will fix.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #6262: Cache templates

2009-11-20 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by akaihola):

 Replying to [comment:34 mmalone]:
 > Er, I changed it so the 's' is inside the backticks, which is apparently
 how it's done elsewhere in the docs. Woot!

 Actually, I meant to point out the missing word "multiple" (or "several").

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #6262: Cache templates

2009-11-16 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 New patch adds deprecation warnings to `load_template_source` functions
 and mentions this API in the internals/deprecation docs. I've written a
 replacement implementation of `find_template_source` for backwards
 compatibility. Russ suggested an alternative approach for specifying
 loaders, where each loader can be a tuple and t[0] is the loader module
 and t[1:] are args. This is useful because you no longer have to import
 and instantiate the loader in your settings.py, so I went ahead and
 implemented it. Finally, fixed a little bug in the Context.get
 implementation.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #6262: Cache templates

2009-11-12 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 Replying to [comment:33 mmalone]:
 > Replying to [comment:32 akaihola]:
 > > Replying to [comment:31 mmalone]:
 > > > New patch
 > >
 > > On line 538 of `docs/howto/custom-template-tags.txt`, you probably
 mean
 > > {{{
 > > There may be multiple ``CycleNode``s in a given template
 > > }}}
 > > instead of
 > > {{{
 > > There may be ``CycleNode``'s in a given template
 > > }}}
 >
 > Yea, that is what I meant, but if you don't have an apostrophe
 reST/sphinx poops its pants and doesn't format it correctly... so I
 punted. Nice bike shed though if you wanna figure out how to fix it ;).
 Honestly though, I do appreciate the thorough editorial review.
 Er, I changed it so the 's' is inside the backticks, which is apparently
 how it's done elsewhere in the docs. Woot!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #6262: Cache templates

2009-11-12 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 Replying to [comment:32 akaihola]:
 > Replying to [comment:31 mmalone]:
 > > New patch
 >
 > On line 538 of `docs/howto/custom-template-tags.txt`, you probably mean
 > {{{
 > There may be multiple ``CycleNode``s in a given template
 > }}}
 > instead of
 > {{{
 > There may be ``CycleNode``'s in a given template
 > }}}

 Yea, that is what I meant, but if you don't have an apostrophe reST/sphinx
 poops its pants and doesn't format it correctly... so I punted. Nice bike
 shed though if you wanna figure out how to fix it ;). Honestly though, I
 do appreciate the thorough editorial review.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #6262: Cache templates

2009-11-12 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by akaihola):

 Replying to [comment:31 mmalone]:
 > New patch

 On line 538 of `docs/howto/custom-template-tags.txt`, you probably mean
 {{{
 There may be multiple ``CycleNode``s in a given template
 }}}
 instead of
 {{{
 There may be ``CycleNode``'s in a given template
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #6262: Cache templates

2009-11-11 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 New patch addresses some issues that Alex Gaynor had, renames
 parser_context to render_context, adds docs, etc. No big changes,
 basically just a refinement on the previous version.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-08-06 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 Eh, I don't care one way or the other about that particular issue. I
 reversed the order in BlockContext (on Alex Gaynor's recommendation)
 because it's more efficient. Then I reversed the order in Context when I
 consolidated the two classes and made BaseContext.

 I'm all for maintaining backwards compatibility wherever possible, but I
 think in this particular case you're messing with something that's pretty
 clearly an implementation detail and you shouldn't expect it to remain the
 same across releases. That said, if it became an issue that blocked this
 ticket from a merge I'd certainly change it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-08-06 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by SmileyChris):

 The problem with giant patches is that there's the temptation to "fix"
 other things. An example here is changing the ordering of the context
 layers. Now this *may* be a valid change, but there is a separate issue
 open for this, and you don't need to do it to make your patch work.

 Even if it's not a public interface, I have seen people using
 `context[-1]['some_global'] = yay_for_hacking_internals`. So "fixing" not
 critical things just hurts getting the ticket committed (due to backwards
 incompatibilty concerns).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-08-06 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 New patch addresses a couple of failing tests. There wasn't really
 anything broken in the implementation, but some of the tests made
 assumptions that were no longer valid due to small changes in the internal
 API. Where possible/practical I changed the API rather than the tests.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-08-05 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mmalone):

 Replying to [comment:24 SmileyChris]:

 Awesome feedback SmileyChris, thanks.

 >   * Good job on the parser context idea. My thoughts were to just create
 a render-local "globals" - do you think the multi-level idea of context is
 really necessary?

 I started with basically just a dictionary, but I realized that each
 template needs a new block context when it's rendered, otherwise recursive
 rendering (i.e., included templates) breaks. When I thought about it I
 figured it probably made sense to start each template render with a
 "fresh" context. It made the block context implementation easier, and I
 couldn't think of any use cases where you wouldn't want this behavior, so
 I went with it. I'm definitely flexible on this matter though if anyone
 has a better idea!

 >   * You should abstract the common elements of `ParserContext` and
 `Context` to a `BaseContext` class.

 Definitely. Fixed in new version.

 >   * In the loaders, shouldn't you keep the top level function
 `get_template_sources` around for backwards compatibility too?

 Possibly... I guess it is technically public interface (though I doubt
 it's used much in practice). I guess it wouldn't hurt to implement it the
 same way load_template_source is implemented (except that we'd basically
 be committing to supporting this functionality indefinitely, which may
 make future changes more difficult).


 >   * In `BaseLoader`, you named the function `load_template_from_source`
 when it should be `load_template_source`

 Good catch, fixed in new version.

 >   * In `loaders.py`, you're renaming the function `find_template_source`
 to `find_template` - is it worth it for the backwards incompatibility?

 Another good question. I'm not sure one way or the other. If people are
 using this in practice, then it's probably worth keeping it. I renamed it
 since it's no longer returning template "source" all the time (as you
 probably guessed).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-08-05 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  mmalone
Status:  new | Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

  * owner:  SmileyChris => mmalone
  * status:  assigned => new

Comment:

 Looking good. I've reassigned the ticket to you for now.

 Couple of thoughts from a quick (non-comprehensive) review:

   * Good job on the parser context idea. My thoughts were to just create a
 render-local "globals" - do you think the multi-level idea of context is
 really necessary?

   * You should abstract the common elements of `ParserContext` and
 `Context` to a `BaseContext` class.

   * In the loaders, shouldn't you keep the top level function
 `get_template_sources` around for backwards compatibility too?

   * In `BaseLoader`, you named the function `load_template_from_source`
 when it should be `load_template_source`

   * In `loaders.py`, you're renaming the function `find_template_source`
 to `find_template` - is it worth it for the backwards incompatibility?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-08-05 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by mmalone):

 * cc: mjmal...@gmail.com (added)

Comment:

 I've attached a diff (cache_templates.2.diff) that's sort of a synthesis
 of patches and ideas from comments here and in #9154 and #9874. I've
 refactored a bunch of the template loading stuff to make it easier to
 extend. With this patch you can optionally return a compiled template from
 a template loader, this allows you to implement template caching in a
 template loader. I've also added a parser_context stack to the Context
 object. This can be used by template tags to store state (instead of
 storing it in instance variables) and makes creating thread-safe template
 tags a lot easier. I've gone ahead and fixed block, extends, and cycle
 (thanks to the prior work on this from cainmatt and mc).

 Thoughts & comments more than welcome. I want to try to get some version
 of this into 1.2 since, by my measurements, it's a big win for apps that
 have complex templates.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-05-12 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mc):

 Vadim,

 It would be best for you to test speedups on your own application.
 Normally template parsing would only be a small part of overall
 application time (~<20%).

 The loader_tags.diff changes by themselves would not result in a speedup.
 They are necessary but not sufficient for caching templates.

 I have implemented a very simple dict lookup in
 template.loader.get_template() similar to #9154.

 The reason I wanted to cache templates is that I have custom tags which do
 some processing during parsing which I don't want to repeat all the time.

 A very rough test of one of my pages yielded:
 Requests / sec
 18  Django-1.0.2
 24  template cache on (33% improvement)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-05-05 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mrts):

 As mentioned before, #9874 and #9154 are duplicates. Closing them in
 favour of this one. Both of them have patches which may or may not be
 useful.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-04-28 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by Vadim Fint ):

 cainmatt, could you please post any speedups (in %%) you notice? Thanks.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-04-28 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by cainm...@gmail.com):

 See loader_tags.diff for some changes to support caching of templates
 which use {% block %} and {% extends %}.

 Caching only works if tags do not change their attributes in render().
 render() should only set local variables and perhaps alter context.
 #7501 (cycle tag) will also cause problems if templates are cached

 I'm not sure which of the several "template caching" issues is the best to
 comment on. See also #9874 #9154

 Notes on loader_tags.diff:
  * store block relationships in context rather than template nodes
  * build block dictionaries at template parse time rather than render time
  * always use get_template to load templates (not find_template_source)
  * a special block_context object is placed at context!['block'] to
 support block overrides and {{ block.super }}.
  * TODO: reduce visibility of block_context
  * TODO: #7501

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2009-01-29 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by Reflejo):

 * cc: refl...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2008-10-29 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by lemuelf):

 * cc: [EMAIL PROTECTED] (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2008-09-26 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by anonymous):

 We are using memcache as the backend. I haven't had time to check it out
 fully yet, but it seems like it's when 'cache' gets imported on line 24
 there is some work going on which slows down the response. I'll
 investigate further and report back.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2008-09-25 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by SmileyChris):

 Could be something to do with the caching backend you're using (since this
 patch uses Django's caching). I don't really see how it could slow it down
 that much though - after the initial template cache, it should be
 returning your full cached view.

 I find it hard to see how a one time cache can cause an ongoing half in
 your views if they are fully cached.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2008-09-25 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by anonymous):

 I've benchmarked this with an app that uses full view caching, and it
 seems to be the cause of a large performance DEcrease :( I'm not sure why,
 but without this patch I get 900page/second (using ab), with it almost
 halves.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #6262: Cache templates

2008-09-24 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

  * status:  new => assigned

Comment:

 Related ticket: #9154

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@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-updates?hl=en
-~--~~~~--~~--~--~---