cookiecutter-django
cookiecutter-django copied to clipboard
Extremely slow response times in local dev
What happened?
Average response time is 8000ms or more. Regardless of page.
What should've happened instead?
Previous versions responded in less than 1000ms even with heavy queries.
Additional details
- Host system configuration:
- Version of cookiecutter CLI (get it with
cookiecutter --version): Cookiecutter 1.7.2 - OS: OSX 10.15.6
- Python version: Python 3.8.5
- Docker versions (if using Docker): Docker version 19.03.12, build 48a66213fe
- Docker Compose version: docker-compose version 1.26.2, build eefe0d31
- Version of cookiecutter CLI (get it with
I'm using docker-compose to develop and deploy. I have no problems with the production settings.
In settings/local.py with DISABLE_PANELS commented out I'm back to 500ms response times or less.
DEBUG_TOOLBAR_CONFIG = {
# "DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
"SHOW_TEMPLATE_CONTEXT": True,
}
It could be just me but I wanted to share in case anyone else is having issues.
Facing same issue, after commenting DISABLE_PANELS response time improves
This is a godsend bug report. It literally save me thousands of dollars. My 8 year old macmini was so slow I couldn't bear the development process anymore. I was going to upgrade it immediately. Now things are good. Make development great again.
Looks like the same issue has been reported to Django Debug Toolbar: https://github.com/jazzband/django-debug-toolbar/issues/1263
Is it the same or a different one? We might want to comment this part of the config for now until it's fixed...
I was encountering the same issue as well, for some reason response was faster when using the node server on port 3000 than the django one at 8000 but this may be irrelevant.
@somada141 Does it help when you're on the admin page? I tried it and I'm still getting 7000ms+ response times there.
I used to get 14-30 second response times. Something that can help when developing your frontend is to use SHOW_TOOLBAR_CALLBACK:
DEBUG_TOOLBAR_CONFIG = {
"DISABLE_PANELS": ["debug_toolbar.panels.redirects.RedirectsPanel"],
"SHOW_TEMPLATE_CONTEXT": True,
"SHOW_TOOLBAR_CALLBACK": "config.utils.toolbar.enable_toolbar",
}
def enable_toolbar(_) -> bool:
return False
And I would just flip it on and off whenever I actually needed the toolbar.
@kanusek yes the responses are far-faster across the board including the admin interface.
Facing same issue, after commenting DISABLE_PANELS response time improves
This worked for me
In settings/local.py with DISABLE_PANELS commented out I'm back to 500ms response times or less.
Thanks a lot! It really worked.
In
settings/local.pywithDISABLE_PANELScommented out I'm back to 500ms response times or less.
Thanks a lot! This save me after lots of hours and days of frustration!
This is insane, not only response time is affected but it injects instability as well.
I was getting random 404 responses before commenting out DISABLE_PANELS