1

As title. Say that I have 20 buffers and only 4 buffers are shown (Assume in my current tab, I only have 4 splits). Since 20 buffers are there and each one is attached with some LSPs, I assume that removing those 16 hidden buffers would increase the performance of neovim. Is this correct?

5
  • 1
    This seems reasonable if the LSP is indeed running for the hidden buffers (which may only be the case if they were actually loaded?). But if you delete them and later need to re-open them, you pay the startup cost of the LSP again. Nit: it probably won't be (Neo)Vim performance but overall system perf. With enough CPUs it wouldn't matter anyway /s
    – D. Ben Knoble
    Nov 30, 2022 at 13:59
  • You're right... I remember the hard time when I had to wait for about 30s for Omnisharp LSP to "wake up" to start a Unity project. Now I think about that maybe I should not delete them. Nov 30, 2022 at 16:11
  • 1
    Maybe what you're seeing might be the buffers used to display completion popup. Buffers don't take up a lot of resources and depending on your lsp client it might use these as cached responses from the lsp server. They are not meant to be displayed with :ls as they are hidden by default, but with :ls! you will see them.
    – dza
    Dec 7, 2022 at 22:13
  • 1
    @dza: You might put your comment into an answer because I think it's very reasonable. (just reviewing my un-answered questions) Feb 6, 2023 at 13:56
  • @job_start I just did, thanks.
    – dza
    Feb 6, 2023 at 23:31

1 Answer 1

1

Maybe what you're seeing might be the buffers used to display completion popup.

Buffers don't take up a lot of resources and depending on your lsp client it might use these as cached responses from the lsp server.

They are not meant to be displayed with :ls as they are unlisted,

(:h unlisted-buffer) by default.

But with :ls! you will see them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.