My understanding is that since the render function writes the full buffer every time to write the new lines to render, the undo log is creating an entry containing basically a full file each time. The memory quickly grows because of that.
A way to test it is to open a buffer with an LSP attached to it, write some invalid syntax on many lines, and simply move the cursor many times on those lines. If you watch the nvim memory usage (watch -d -n 1 "ps -ax -o pid,%mem,command | grep nvim | grep -v grep"), you should see it increase.
My understanding is that since the render function writes the full buffer every time to write the new lines to render, the undo log is creating an entry containing basically a full file each time. The memory quickly grows because of that.
A way to test it is to open a buffer with an LSP attached to it, write some invalid syntax on many lines, and simply move the cursor many times on those lines. If you watch the nvim memory usage (
watch -d -n 1 "ps -ax -o pid,%mem,command | grep nvim | grep -v grep"
), you should see it increase.