Python: join my optimization workshop in Lisbon, 10th October

I’m running a workshop in Lisbon next month, and you’re invited!
It’s a small, in-person, hands-on session on optimizing Python code, with a Django flavour. Here are the details:
- What: Python optimization workshop
- When: Saturday 10th October 2026, 10:00–13:00
- Where: Martinhal Lisbon Oriente, Parque das Nações, Lisbon.
- Cost: Free, but places are limited and registration is required
- Size: Up to 10 people
- Led by: Myself, Adam Johnson
- Organised by: Mafalda Marques
What we’ll do
In my experience, Python projects often have some easy performance improvements waiting to be found, from client projects to large open source projects like Django itself. This workshop is designed to teach you how to find the hot spots worth optimizing, using these three tools in a loop:
- Capture a profile with
cProfile, Python’s built-in profiler. - Drill into it with profiling-explorer, to find where the time actually goes.
- Prove your change worked with tprof, which measures just the functions you care about and can compare before against after.
I’ll teach the loop end-to-end on a real example. Then we’ll spend most of the morning using it for real, and you can pick your target:
Django itself.
I’ll bring a small collection of potential optimization targets in the Django codebase. You can try out the loop optimizing them, figure out if there are safe and worthwhile optimizations to be made, and potentially make a pull request to Django itself. I’ll help shepherd the promising ones towards being merged after the workshop.
Another project.
If you’d rather point the tools at something else, like another open source project or a work codebase, feel free. We can still work together to find some gems.
We’ll try working in pairs, and at points we can chat as a group to compare notes on what we’ve found.
There’s a break in the middle, with coffee, tea, and pastries provided.
Who it’s for
Intermediate and experienced Python developers. Django experience is helpful, especially if you want to work on Django itself, but it isn’t required. The tools and the loop are plain Python, and the “your own project” track works with any codebase.
You don’t need to have profiled anything before.
What to bring
A laptop, with Git and a recent Python version installed. I’ll send setup instructions to everyone who registers, a week or so beforehand. It only takes a few minutes, but please do it before you arrive, so we can spend the time on the interesting parts.
This is a workshop, not a talk, so we’ll be talking and coding together throughout the session.
Register
There are only ten places in order to keep the session manageable, so please stick to your registration.
Check out my new book Boost Your GitHub DX.
One summary email a week, no spam, I pinky promise.
Related posts: