~/talk

Processing large JSON files without running out of memory

Talkat PyData Boston 2025 · 2025-12-08..12-10· [python, web-performance]
slides:none on file

Loading a 50 MB JSON file can use ~230 MB of RAM (about 4.5×) and a 10 GB file can demand ~40 GB, so peak memory is the limiter not average. Four practical fixes appear: buy more RAM, use compact in‑memory formats (awkward/Arrow → polars/pandas), only decode needed fields (message spec / pydantic tradeoffs), or process by streaming/chunking (iJSON, NDJSON lines) to keep memory bounded.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10Ethical considerations
  3. 3:58Memory usage matters
  4. 6:43Measuring memory in Python
  5. 7:26Four solutions
  6. 10:39Efficient in-memory representations
  7. 14:51Load only needed data
  8. 17:39Streaming JSON files
  9. 22:18Alternatives to JSON
  10. 25:08Why measure memory
  11. 26:09Recap of strategies
  12. 26:54Q&A
~/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.