My Django application is insanely slow, I want to figure out what is taking time :
I tried Django-debug-toolbar
but was unable to find a panel that can give me the break-up of the load time.
My requirements:
- A stack-trace type output with time of execution for each module called to render the page.
- I want to realize what part of the whole page rendering process is taking the time ?
- Also, what part is consuming how much CPU [ MOST IMPORTANT ] ?
Can django-debug-toolbar
do that ? [ What panel ? ]
Any other django-app that can do that ?
Finally figured out a way to profile my django webapp :
Following 2 django snippets provide
middleware
that profile the whole flow and outputs if request hasprof
inGET keys
:http://djangosnippets.org/snippets/727/ [ Uses cProfile ]
http://djangosnippets.org/snippets/186/ [ Uses hotshot ]
Plain and simple profiling - Saved my day !