I noted that manage.py runserver
takes a lot of time to start the development web server for a Django project I'm working on. I'm wondering if there's a way to understand what part of the startup requires so much resources, being eventually able to collect enough information to fix the problem.
Anyone has an idea about what could I do?
I found an easy and effective solution doing this:
python -m cProfile manage.py runserver > profiled
Further details about Python profilers here (official docs).
I'd also post a link to a video introduction to Python profiling and related tools (PyCon 2009)
While using Vagrant, move virtualenv
folder away from /vagrant
.
See my answer for similar question.