I’d also appreciate an option for this. I think, currently it’s still hard-coded to 30 and that is really not much.
There is an open issue about this to be handled dynamically here:
I personally dont see the memory problem as a valid argument for 99% of users but maybe there is a better solution that someone has in mind. I’m also not sure whether the undo stack is even one of the most memory intense components in mypaint.
I also made some (testing) modifications back in 2018 that set the limit higher and uses a deque instead of rewriting a stack manually whenever it was full. That resulted in a noticable performance boost when using high undo limits.
Configurable undo stack size is now in the master branch, and since it involves no gui string changes it will be backported to the upcoming 2.0.1 (mostly) bugfix release. For now the size is only configurable by editing the settings.json file, but proper inputs will most likely be added for the next minor release.