Performance and optimization
Performance and optimization
This document provides an overview of techniques and tools that can help get your Django code running more efficiently - faster, and using fewer system resources.
Introduction
Generally one’s first concern is to write code that works, whose logic functions as required to produce the expected output. Sometimes, however, this will not be enough to make the code work as efficiently as one would like.
In this case, what’s needed is something - and in practice, often a collection of things - to improve the code’s performance without, or only minimally, affecting its behavior.
General approaches
What are you optimizing for?
It’s important to have a clear idea what you mean by ‘performance’. There is not just one metric of it.
Improved speed might be the most o