-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Extremely long request time with StaticFilesPanel #1394
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
Comments
Do you have additional details where the slowdown happens? |
@matthiask I believe the source of of the slowdown is is
It's enumerating every static file, used or not, in order to display "django.contrib.staticfiles.finders.FileSystemFinder (95449 files)" and list all these files in the result panel. I'm not sure how useful that is, but it's time consumption is likely proportional to the number of files. |
Thanks! Yeah, that sounds right. Also, it will possibly be much worse if people are using a cloud-based static files storage. I'm not sure enumerating all available static files is all that useful. |
@matthiask maybe if just disabling static file enumeration via configuration would solve the issue. |
I just recently upgraded from
django-debug-toolbar==2.2
todjango-debug-toolbar==3.1.1
. Unfortunately, I did this after a few changes to the core behaviour of the project in question, and so upon noticing a significant increase in response times, across all views I started taking apart changes to no available until I downgradeddjango-debug-toolbar
and everything went back to normal.Coming here, If found #1263, and proceeded to start testing the removal of panels, starting with an empty
DEBUG_TOOLBAR_PANELS
. Ultimately, I singled outdebug_toolbar.panels.staticfiles.StaticFilesPanel
To quantify the problem, using response times as seen in Firefox's Network Tab for a HTML response:
DEBUG_TOOLBAR_PANELS
and commending outStaticFilesPanel
: ~0.030 sThe text was updated successfully, but these errors were encountered: