I have a django project, and the problem is - it eats a lot of memory and loads hosting.
How can I find problem areas in a project that contain a lot of memory?
In general, for debugging / profiling, I offer the django-debug-toolbar as the source location, as well as various tips in:
http://docs.djangoproject.com/en/dev/topics/db/optimization/
However, this will not provide information on memory usage. If you really need it, you can try some middleware using pympler to use log memory while debugging and starting the development server.
http://www.rkblog.rk.edu.pl/w/p/profiling-django-object-size-and-memory-usage-pympler/?c=1
, webapps , dev-webserver (, ).
, , DEBUG=False:
DEBUG=False
http://docs.djangoproject.com/en/dev/faq/models/#why-is-django-leaking-memory
Django DEBUG = True, Django , .
DEBUG = True
DEBUG, gc , , gc.set_debug(gc.DEBUG_LEAK) settings.py. , .
gc.set_debug(gc.DEBUG_LEAK)
settings.py
, DEBUG = True. , -.
Django . , , , .
python, django.db.reset_queries() , . .
django.db.reset_queries()