Hi Christian, On Sun, Jul 23, 2023 at 12:24 PM Christian Brabandt < [email protected]> wrote:
> is this actually a problem? > > > Yes. Many of the LSP plugins use the bufloaded() function to check whether a buffer is loaded or not. If the buffer is not loaded, then they call the bufload() function to load the buffer. This is done before refreshing signs, virtual text, highlights, etc. in a buffer. So this function is called many times. If this is an expensive operation, then this will slow down the plugin. For this reason, in the Vim9 LSP plugin, I used the bufload() function to unconditionally load the plugin without using the bufloaded() function. If the buffer is already loaded, then this is no-op. Also, if the buffer number is used instead of the buffer name, then the directory is not changed. So the LSP plugin uses only the buffer number for the call to bufload(). Regards, Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7kMbrMrThDvAD8pZSQ8CZ8Oq7L5-NCWGUN9yMPnzUOKvw%40mail.gmail.com.
