As mentioned last week, I’m working on a different approach to handling undo in dyntopo. The new code is up in the usual place on a branch called dyntopo-slim.
The dyntopo branch has 36 commits touching 107 files with 7406 insertion and 624 deletions. The dyntopo-slim branch has only 25 commits and touches 51 files with 5377 insertions and 258 deletions.
The latter set of numbers will no doubt increase, but it should be clear that the new method is much less intrusive. It’ll be quicker to review and easier to maintain. Further, it should be more memory efficient.
The new code is not yet complete; it won’t work with the symmetrize operator (which is temporarily disabled), it’s leaking memory sometimes, and it’s leaving more loose edges lying around. (Dealing with loose edges is a general todo that needs solving in dyntopo.)
If you’re feeling brave, give the new branch a try. If you find crashes with undo/redo let me know, and I’m also curious to hear how memory usage compares.