Processing large JSON files without running out of memory
summary
Shows concrete numbers and tools: json.load -> 50 MB file becomes ~200 MB (4x) measured with user/bin/time, resource and tracemalloc. Demonstrates three fixes with real outcomes: awkward/Arrow -> peak ~100 MB (2x) but different API, message-spec schema -> ~100 MB but may still read whole file into memory, and ijson streaming -> ~1 MB peak independent of file size. Notes pandas/polars can use more memory, recommends measuring peak and choosing streaming, schema subsetting, or Arrow based on data shape and API needs.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:07JSON memory usage
- 7:41Buying more RAM
- 10:30Efficient in-memory representation
- 15:49Load only needed data
- 19:43Stream JSON efficiently
- 25:38JSON alternatives
- 29:31Summary
related talks
37mProcessing large JSON files without running out of memory
24mSerialization More than pickling
33mSkinny Pandas Riding On A Rocket
40mBeyond Pandas: The Great Python Dataframe Showdown
01h 04mAPI Design as a Performance Primitive
01mSmall Big Data: using NumPy and Pandas
36mThe Perils of Large Files
54mUnderstanding of Jsonb Performance
