django-pipeline
django-pipeline copied to clipboard
Prevent multiple collect in jinja template tags
This issue has been already fixed for Django templates — https://github.com/cyberdelia/django-pipeline/pull/455
But there is no request inside jinja extensions. So we need to make PipelineExtension more generic.
Hey @lexqt
I know this was two years ago but what's up with this PR?
I'm currently using django 1.11 with jinja and django-pipeline and it's sooo sloooow when using DEBUG=True. Every request takes about 2-4 seconds. I noticed the Collector.collect method has to do that crazy loop of loops against disk 5 times per request (I guess 5 because I have 5 things like {% javascript something %} in the jinja templates).
For now, to get a better dev environment I set:
PIPELINE = {
...
'PIPELINE_COLLECTOR_ENABLED': False,
}