Skip to content

Commit d95c58b

Browse files
authored
Django Debug Toolbar: disable slow panels (#11804)
SQL and Templates panles are pretty slow to render. We are disabling them by default but still showing the panel in the toolbar, so they can be re-enabled if required from there.
1 parent cb78051 commit d95c58b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

readthedocs/settings/base.py

+11
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ def _show_debug_toolbar(request):
6363

6464
return {
6565
"SHOW_TOOLBAR_CALLBACK": _show_debug_toolbar,
66+
"DISABLE_PANELS": [
67+
# Default ones
68+
"debug_toolbar.panels.profiling.ProfilingPanel",
69+
"debug_toolbar.panels.redirects.RedirectsPanel",
70+
# Custome ones
71+
# We are disabling these because they take a lot of time to execute in the new dashboard.
72+
# We make an intensive usage of the ``include`` template tag there.
73+
# It's a "known issue/bug" and there is no solution as far as we can tell.
74+
"debug_toolbar.panels.sql.SQLPanel",
75+
"debug_toolbar.panels.templates.TemplatesPanel",
76+
]
6677
}
6778

6879
@property

0 commit comments

Comments
 (0)