django-pipeline icon indicating copy to clipboard operation
django-pipeline copied to clipboard

Prevent multiple collect in jinja template tags

Open lexqt opened this issue 10 years ago • 2 comments

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.

lexqt avatar Nov 13 '15 12:11 lexqt

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).

peterbe avatar Dec 20 '17 02:12 peterbe

For now, to get a better dev environment I set:

PIPELINE = {
    ...
    'PIPELINE_COLLECTOR_ENABLED': False,
}

peterbe avatar Dec 20 '17 02:12 peterbe