Contribute Media
A thank you to everyone who makes this possible: Read More

Tips and tricks for optimizing Django response times

Description

Over the last 6 years I've been working on many different projects that needed to manage great amounts of data. I've stumbled upon some common response time issues that could arise while developing production web applications in Django.

This talk will present some of these real use cases and how to prevent and solve them using best practices, most of them proposed by Django in their documentation, and different debug tools. The idea is also to stand out the importance of understanding which queries are performed under the hood in Django in order to determine what's the best solution in case response times need to be improved.

We’ll cover: What could improve or prevent high response times in the Django admin. How to determine what's the cause if this happens. What could improve or prevent high response times with DRF. How to determine what's the cause if this happens. Understanding which queries are performed by Django and what we could do to improve them, such as checking the execution plan, which indexes are being used and their order, restricting the attributes in select clauses, filters and joins. What other options there are if no improvements could be done (cache, pre-calculated tables with Celery, materialized views)

Details

Improve this page