DjangoCon 2014- Optimizing your webapp by using django-debug-toolbar

preview_player
Показать описание
This talk explains how to perform SQL query analysis and how to rewrite your views to reduce the number of queries Django uses in evaluating your model objects and their attributes. Special emphasis will be given to the powerful methods "select_related" and "prefetch_related." I will highlight the problem with a naive use of the ORM, how to target code for optimization, and the beneficial result.

Help us caption & translate this video!

Рекомендации по теме
Комментарии
Автор

if you are builting a json endpoint with rest framework note the CPU time will be misleading, instead use postman to measure the timing for your json apis.

morenoh
Автор

Nice explanation to understand django toolbar. I am facing same problem with my site, executing much queries on single page. I will try this on my site.

shaileshrudra