Episode Details
Back to Episodes
#489: Or JSON?
Episode 489
Published 4 weeks, 2 days ago
Description
Topics covered in this episode:
- django-orjson
- Best Django Redis configuration for speed and size
- Linus Torvalds puts the foot down against Anti-AI Kernel Maintainers
- Django Steering Council backs the Triptych Project
- Extras
- Joke
About the show
Sponsored by us! Support our work through:
- Our courses at Talk Python
- Consulting from Six Feet Up
Connect with the hosts
- Michael: Mastodon / BlueSky / X / LinkedIn
- Calvin: Mastodon / BlueSky / X / LinkedIn
- Show: Mastodon / BlueSky / X
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesday at 7am PT. Older video versions available there too.
Michael #1: django-orjson
- Adam Johnson dropped
django-orjson- drop-in replacements for the Django and DRF pieces that touch JSON, swapping stdlibjsonfor orjson, the Rust-based library. Headline numbers: 10x faster serialization, 2x faster deserialization. - The interesting question is why this needs to be a package at all.
pip install orjsonis the easy part. Adam's actual pitch: adopting it "isn't easy, especially when your framework usesjsonin many different parts." Django scatters JSON acrossJsonResponse, the test client and test case classes, thejson_scripttemplate tag, and more. There's no single hook to grab, so you get a library that catches them all. - Adam is refreshingly honest about the scale of the win. His words: "While database queries tend to dominate the typical Django application's runtime, the time spent in serialization and deserialization can still be significant." He calls it "a nearly free performance win" - not "this will 10x your app." That's a claim about cost, not magnitude, and it's worth keeping those straight.
- Worth flagging what the post does