#24374: IncludeNode should use Template._render rather than Template.render
--------------------------------------+--------------------
     Reporter:  prestontimmons        |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Template system       |    Version:  master
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 When Template.render is called, it creates a new stack on the context. It
 also potentially sets context.template and adds the context processors to
 RequestContext.

 I'm pretty sure this is unnecessary since the IncludeNode already pushes
 to the context stack or creates a new context internally. Calling
 Template._render here would be a slight optimization and remove the need
 for the conditional logic to set context.template on toplevel_render.

 All the tests seem to pass if this change is made.

--
Ticket URL: <https://code.djangoproject.com/ticket/24374>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.74d81b2b6f063e8e38e34711dbe3cca8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to