simnalamburt / vim-mundo

:christmas_tree: Vim undo tree visualizer

Home Page:https://simnalamburt.github.io/vim-mundo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Very very slow

eyalk5 opened this issue · comments

Hi, I am on latest version of mundo , neovim 0.5 .

When I tried to open it, it hanged for more than 10 minutes, and it still hasn't opened.
I believe eventually, it would be opened as I remember delays of 5 minutes.
The file is text file 43 kb.

I did made a lot of changes along the time.
I do have some "memory pressure" in my OS, as appeared in activity monitor (like close to 16gb of ram usage, probably need to go to page file ). But other things work pretty well.

So, it is not justified. Can something be optimizied out?

According to my findings so far, the main culprit is not the amount of nodes, nor the rendering code for formatting the graph's output, but the fact that diffs are computed upfront - this shouldn't be needed if g:mundo_inline_undo is false, but even when it's true, inline diffs should optimally only be computed for the currently visible nodes. I've left a comment with more details and a suggestion there:

#14 (comment)

If that comment doesn't pick up activity then I'm planning to file a new issue. @simnalamburt you mention in the further plans that making this plugin faster is a goal, so I'd appreciate if you could opinion on the ideas I posted in that comment.

Thanks for the report @eyalk5, @resolritter! Looks like vim-mundo is performing unnecessary calculation during startup. I don't have enough time to fix this issue for right now, but I'll try to make some spare time within this month. 😢

Looks like this issue is duplicate of #14, I'll close this issue and continue the conversation overthere to consolidate information into one.