﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22086	Building of template nodelist inside cache blocks	Henrik Ossipoff Hansen	nobody	"Based off of a rather large application in Django, our templates have grown quite complex. As such, when a template is compiled, it contains a huge bunch of nodes in the template's nodelist. Without knowing too much about the actual internals, my it is my understanding that anything included within a `{% cache %}{% endcache %}` tag will still have its template nodes built, just not rendered - this is handled by the caching mechanism instead.

While this obviously is alright in the most cases, we have several places in our codebase where this is not enough; yes, the caching makes the rendering/implementation of the individual nodes not happen, which obviously is the whole point of the caching, but just representing the individual nodes in the node tree, inside the cache block, takes up a lot of time. In one of our application parts, we've timed this ti between 100ms and 200ms (based off inserting just the actual HTML stored in the cache instead of the Django template logic).

Now, there would obviously be an overhead in making a cache check before building the nodelist, and in most cases, I assume it's not needed - but I believe an option to enable this behaviour is in order. I would, at least, like to start a discussion about it - I'm sure we're not the only ones out there who would benefit from such an option."	Cleanup/optimization	closed	Template system	1.6	Normal	wontfix	template, cache		Accepted	0	0	0	0	0	0
