Michael Kennedy
Michael Kennedy's Thoughts on Technology
Tools
Topics
Courses
Talk Python
Python Bytes
Open Source
AI Enablement
About
© 2006 - 2026 Michael Kennedy
Performance
Catch the import. Name the culprit. Keep threads free: Introducing gilguard
On free-threaded Python, one import can quietly turn the GIL back on for good. gilguard turns that moment into an error that names the module, the package, and the line of your code that pulled it in.
Nov 6, 2026
Chameleon templates, modernized: chameleon-rs
I rewrote Chameleon in Rust to make Python web apps faster. chameleon-rs runs your existing templates unchanged and adds async rendering, Markdown, and free-threaded Python support.
Oct 27, 2026
Cutting Python Web App Memory Over 31%
I reduced Python web app memory by 3.2 GB using async workers, import isolation, the Raw+DC database pattern, and disk caching. Detailed before and after numbers for each technique.
Apr 1, 2026
Raw+DC Database Pattern: A Retrospective
After migrating three production Python web apps to the Raw+DC database pattern, I share real-world performance benchmarks: nearly 2x requests per second, 18% less memory, native async support, and freedom from unmaintained ODM libraries.
Mar 30, 2026
Replacing Flask with Robyn wasn't worth it
I converted Python Bytes from Quart/Flask to the Rust-backed Robyn framework and benchmarked it with Locust. The result: no meaningful speed or memory improvement. Here's why framework maturity still wins.
Mar 23, 2026
Fire and forget (or never) with Python’s asyncio
Python's asyncio.create_task() can silently garbage collect fire-and-forget tasks in 3.12+. Learn the background_tasks set pattern to fix it.
Mar 18, 2026
Python Numbers Every Programmer Should Know
A cheat sheet of real-world timing and memory numbers to guide performance-sensitive decisions.
Dec 31, 2025
We Must Replace uWSGI With Something Else
uWSGI is in minimal maintenance mode, now what?
Oct 3, 2024
Let's go easy on PyPI, OK?
Why do we pound PyPI when we have caching?
Sep 28, 2024
Docker images using uv's python
uv has added a new way to build Python-based containers.
Sep 5, 2024
Black Friday: A Lesson in Python Performance
Black Friday almost melted our servers
Nov 24, 2022
20% Faster Python with a Single GC Tweak
Your Python GC settings are wrong and they are hurting your performance.
Nov 17, 2022