~/talk

Green Coding with Django

Talkat DjangoCon Europe 2023 · on Wednesday, 2023-05-31· at 10:25· Music Hall· [web-performance]
links:none on file
slides:none on file

Green Coding focuses on measurable wins: clearing background tabs to avoid CPU/RAM/swap waste, and addressing app-level inefficiencies where most energy goes. Profiling with cProfile, Django Debug Toolbar, Silk or perf and monitoring with Datadog/Sentry finds hotspots. A concrete case: 5,000 questions with 5 choices (25k rows) runs ~50s and ~5,000 queries without prefetch_related and ~1s with 2 queries using prefetch_related; use bulk_create for inserts (drops tens of seconds to <2s) and optimise DB indexes and caching.

AI-written summary · about

  1. 0:00Introduction to green coding
  2. 2:02Behavioral considerations
  3. 5:43Hardware and efficiency
  4. 11:17Personal habits and energy
  5. 16:40Structural code efficiency
  6. 21:55Code optimization techniques
~/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.