Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent multiple collect in jinja template tags #511

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lexqt
Copy link
Contributor

@lexqt lexqt commented Nov 13, 2015

This issue has been already fixed for Django templates — #455
But there is no request inside jinja extensions. So we need to make PipelineExtension more generic.

@peterbe
Copy link

peterbe commented Dec 20, 2017

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
Copy link

peterbe commented Dec 20, 2017

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants