Replies: 2 comments
-
That's an interesting question. For 'mini.statusline' and 'mini.hipatterns' high performance was (and is) a design goal. The same goes for 'mini.cursorword', but slightly less so as it is more constrained by the implementation: it uses Vim's built-in word matching which I am pretty confident is quite optimized (at least it automatically highlights only visible instances, which is usually enough). The actual problem is conducting proper benchmarking. There are at least two issues:
That said, I remember seeing 1.5-2 years ago a pretty rigorous speed comparison between statusline plugins present at that time. 'mini.statusline' was the fastest with the benchmark's author's statusline plugin being second. So I guess it is pretty fast compared to others :) The timing of this is actually rather interesting. About a week or two ago I noticed that 'mini.statusline' doesn't cache diagnostic data on |
Beta Was this translation helpful? Give feedback.
-
'mini.statusline' now even caches diagnostic data on |
Beta Was this translation helpful? Give feedback.
-
Contributing guidelines
Module(s)
mini.cursorword, mini.hipatterns, mini.statusline
Question
My favorite part of mini plugins is reading the comparison to other similar plugins section of the help page to quickly understand which of the alternatives might be more appropriate.
mini.statusline: Is this more of a simple implementation of a working statusline or does it compare well to performant statusline plugins that might involves extra code to do stuff like caching, rely on autocommands instead of polling, etc.? I wanted to own custom statusline since it's not hard, but what is more involved is ensuring it stays performant (not just usable). What prompted my concern is the short-lived express_line statusline that was focused on performance/efficiency--for some reason it never took off and I don't see popular statusline plugins emphasizing features express_line implemented.
Similarly, how does mini.hipatterns/mini.cursorwords compare to e.g. vim-illuminate (mostly the latter)? I assume mini.cursorwords uses just regex, while vim-illuminate takes on additional sources such as lsp and treesitter. I'm not sure what is different about using lsp/treesitter compared to regex though. Also curious if these plugins ever affect performance by nature of potentially many regex rules applied so frequently on the buffer.
Much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions