Open tino opened 7 years ago
Wow that's awfully slow. The time is mostly spent in stat and listdir it seems. Maybe filesystems operations are slow inside Docker depending on the environment, but I don't know.
We use node_modules/webpack but node_modules would never be part of STATICFILES_DIRS; may I ask the reason for putting node_modules in there?
Removing 'debug_toolbar.panels.staticfiles.StaticFilesPanel',
from DEBUG_TOOLBAR_PANELS
fixes it for me.
No clue why the performance slowdown is so bad, but it's huge. Talking about 500-600ms a page load, easy.
For some reason the staticfiles finder is doing a lot of work, and ends up eating more than two minutes in the
process_response
method (started profiling at the first line, and stopped before the return):I must say I am running inside a Docker container, don't know if that matters.
There are 1089 files in our STATIC_ROOT, and a 29142 in STATICFILES_DIRS, node_modules... Would that be the culprit? It almost adds up to the 156991/29435 ncalls (don't know how to interpret the slash here in the pstats output though).