So here is what I have found out:
- the
py-spidev
module (or some part of spidev itself) seems to be the problem. - besides the memory leak,
py-spidev
is incredibly slow
I've now got rid of py-spidev
and write to /dev/spidev0.0
directly via file handle. No more excessive memory usage and SPI communication now needs about two seconds, that's about a tenth of the time it needed before.