I think the problem is that the automatic code generation from sympy expressions becomes very inefficient when the number of states becomes large. I have been facing this issue too when I tried to use sunode for a discretized version of a PDE, and there is also an issue (opened by someone else) on github.
I have been discussing this with @aseyboldt (the main developer of sunode). He thinks that it might be possible to solve this by using the new numba backend in aesara. I had started experimenting with this last November but then I did not have the time to get it to work. I would like to get back to this but currently I am still very busy with other stuff.
1 Like