I have used spdiags() over many years.
Lately MathWorks have updated the script and the response is much slower.
I have compared spdiags() from R2019a with R2021a on a mac.
The older spdiags() runs in my present test 15 to 40 times faster than the latest spdiags().
I wonder what benefit I get from waiting that much longer, for something that involves plugging numbers into a sparse matrix.