Well, dang. I saw there was a new stable version of cython and decided
to upgrade this morning on a lark. I went through some of the usual
dependency hell, but giving pip the –no-build-isolation
flag, which reuses the current virtualenv instead of creating a
throwaway one just for the build saved me from it – I didn’t even know
pip was doing this, no wonder builds took so long! It must have been
rebuilding the entire system for every dependency? Yeesh.
Surprisingly – and I’m still somewhat skeptical there aren’t hidden problems – it all just works, and I was even able to build against the latest python 3.13.x. I’m not sure if it’s the python upgrade (probably! thanks make cpython faster team) or the cython upgrade (could be!) or the numpy upgrade (hope not! I’m still on track to get rid of it eventually) but the test suite runs now in less than half the time it has for the last couple years. I use the test suite runtime as a back of the napkin guide to see if I’m making performance better or worse, so that’s very cool and encouraging! Went from about 60 seconds to run a hundred or so tests, down to around 20!
I decided this weekend that I need to reconfigure the astrid process callback situation somewhat. Jack has lock free realtime-safe ring buffers and it’s becoming clear I’m never going to be able to use IPC directly inside the realtime callback – because it locks! Maybe one day astrid will have lock-free IPC (hope so!) but that’s a project for a future me. Instead, I’m going to move all the processing into a dedicated thread, and just push samples into and out of it via the jack ring buffers. This has the nice side effect of making astrid ever so slightly more portable, for future iterations with different sound driver backends…
In the meantime I’m delighted that a fairly painless upgrade this morning seems to double pippi’s performance!