IIRC vim became really slow with the combination of large source files (thousands of lines of code) and language server plugins (e.g. code completion and live error squiggles).
I often use vim or nvim on disposable machines, so persistent undo is something very low on my list of things I want.