I'll be up front, I'm unsure this is an issue with this image exactly, given the myriad of things to build under emulation (buildx, qemu).
But since looking to upgrade our image to Trixie, most steps, including Python commands, have gotten noticably slower.
I've put together a toy example here:
https://github.com/stumpylog/nltk-download-reproducer
As you can see, Bookworm under emulation is around a minute to complete. Trixie is about 7 minutes. I have no idea what could have changed here. Is there missing optimization? Does Trixie use newer instructions qemu does not support?