Hunting Performance in Django Code
2021-06-02, 16:35–17:20, Main Room

This talk aims to explain the core concepts/use cases of various profilers in Python/Django world. I will walk over the different types of profilers and the basic use cases for them. The variance in Python Profiling tools we have today can actually be very useful if you know how and when to use them.


Introduction and Outline

Quick introduction of myself followed by an outline of what will be covered and what you will learn.

Why we profile?

A typical program spends almost all its time in a small subset of its code. Optimizing those hotspots is all that matters. This is what a profiler is for: it leads us straight to the functions where we should spend our effort.

What types tools are available and how they work?

-Deterministic Profilers
-Statistical Profilers

I will be walking over the different use cases, pros/cons for each type. Then I will dig in a bit deeper on how they work under the hood. Understanding the inner workings a bit might be helpful while analysing its output.

What kind of information do we get?

I'll describe what kind of output we get from different profilers. What kind of metrics are available(Wall time, CPU time, sub/cumulative time) and where are those metrics are most useful while hunting for performance problems especially
for Web applications. I will also walk over/explain different kind of visualisations that profilers generate: Flamegraphs, Callgraph, SpeedScope...etc.

Questions