~/talk

Off the Beaten Path: Exploring Unusual Roads to Django Performance

Talkat PyCon Greece 2025 · 2025-08-29..08-30· at 12:45· Auditorium "Miltiadis Evert"· [python, web-performance]
links:none on file
slides:none on file

Shows concrete recipes and numbers: using materialized views (unmanaged Django model + custom SQL/migration command) turns a 6.33s author-aggregation into 3.42ms (~1,800× speedup) for analytics; Django 5 generated fields push a 500k-post annotation from 1m47s to 66.8ms by storing computed values in PostgreSQL; rewriting DISTINCT (99ms) as subquery (23ms) avoids sorting; replacing per-author correlated subqueries (2.23s) with a ROW_NUMBER window (560ms) removes thousands of loops.

AI-written summary · about

  1. 0:00Introduction
  2. 1:14Materialized views
  3. 6:44Generated fields
  4. 10:22Distinct vs subqueries
  5. 11:50ROW_NUMBER for queries
  6. 16:40Summary and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.