I had a memory issue with Django's bulk_update queryset method. The TLDR version is that bulk_update prepares all the update statements in advance (even when batch_size is set) which can use more memory than expected. Details and a solution in the blog:
I've improved the performance of the starter packs list query from about 200ms to 2ms. 🎉 The trick was to stop dynamically computing the number of accounts in a starter pack and instead precompute it in a column. A bit more work on each update, but worth it! image
Yesterday, Python 3.14 was released, and today all of my Django side projects are running on 3.14. 🎉 The upgrade didn't require any code changes on my part, but I did see a few return statements in the finally block SyntaxWarnings in a few dependencies.
Over the weekend, I migrated one of my Django Apps from Gunicorn to Granian. TLDR: • The migration went smoothly. • There were no visible performance gains. • I still can't set a timeout for requests. I also wrote a blog post about this:
I'll be giving a talk about Free-threaded Python at the #01 - Python Lisbon Meetup next week (Oct 2)! 🎉 Hope to see you there!
The best TED Talk I've seen was about tying shoes. It's mind blowing that we are all taught the weaker form of the knot as kids and never learn that there is a stronger version.
LLMs really are an amazing peace of technology. How were we ever able to live without them? image
Early birthday present has arrived! 🎂 image