aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/configuration.rst2
-rw-r--r--docs/index.rst1
-rw-r--r--docs/tips.rst29
3 files changed, 31 insertions, 1 deletions
diff --git a/docs/configuration.rst b/docs/configuration.rst
index 3a8c544..310482e 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -103,6 +103,6 @@ The debug toolbar has two settings that can be set in ``settings.py``.
'EXTRA_SIGNALS': ['myproject.signals.MySignal'],
'HIDE_DJANGO_SQL': False,
'TAG': 'div',
- 'ENABLE_STACKTRACES' : True,
+ 'ENABLE_STACKTRACES': True,
'HIDDEN_STACKTRACE_MODULES': ('gunicorn', 'newrelic'),
}
diff --git a/docs/index.rst b/docs/index.rst
index 5134a83..ba372ab 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -6,6 +6,7 @@ Django Debug Toolbar
installation
configuration
+ tips
panels
commands
contributing
diff --git a/docs/tips.rst b/docs/tips.rst
new file mode 100644
index 0000000..25e2859
--- /dev/null
+++ b/docs/tips.rst
@@ -0,0 +1,29 @@
+Tips
+====
+
+Performance considerations
+--------------------------
+
+The Debug Toolbar adds some overhead to the rendering of each page. Depending
+on your project, this overhead may slow down page loads significantly. If that
+makes development impractical, you can tune some settings to disable the most
+expensive features and restore decent response times.
+
+The SQL panel may be the culprit if your view performs many SQL queries. You
+should attempt to minimize the number of SQL queries, but this isn't always
+possible, for instance if you're using a CMS and have turned off caching for
+development. In that case, setting ``ENABLE_STACKTRACES`` to ``False`` in the
+``DEBUG_TOOLBAR_CONFIG`` setting will help.
+
+The cache panel is very similar to the SQL panel, except it isn't always a bad
+practice to make many cache queries in a view. Setting ``ENABLE_STACKTRACES``
+to ``False`` will help there too.
+
+The template panel may be slow if your views or context processors return
+large contexts and your templates have complex inheritance or inclusion
+schemes. In that case, you should set ``SHOW_TEMPLATE_CONTEXT`` to ``False``
+in the ``DEBUG_TOOLBAR_CONFIG`` setting.
+
+Finally, if you don't need the panels that are slowing down your application,
+you can customize the ``DEBUG_TOOLBAR_PANELS`` setting to include only the
+panels you actually use.