Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File switching appears to take time proportional to number of open buffers [edit] #1660

Closed
nyarly opened this issue Jan 24, 2018 · 3 comments

Comments

@nyarly
Copy link

nyarly commented Jan 24, 2018

What did you do? (required. The issue will be closed when not provided.)

I switch files in my Go project (c.f. https://github.com/opentable/sous). e.g. Using <C-^>.

What did you expect to happen?

The new file to open nearly instantly.

What happened instead?

There's a noticeable delay - on the order of half a second.

It's a drag but I've been living with it.

Update: I had many dozens of files open in buffers. Closing those out (rather: restarting Vim after stripping my session) restores quick switching between buffers.

I don't think I've seen this behavior in e.g. Rails projects, which can also accumulate buffers quickly.

Configuration (MUST fill this out):

  • Vim version (first two lines from :version):
NVIM v0.2.0                                                                                                                                                                      
Build type: Release
  • Go version (go version):
go version go1.9.2 linux/amd64
  • Go environment (go env):
GOARCH="amd64"                                                                                                                                                                  
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/judson/golang"
GORACE=""
GOROOT="/nix/store/0b91dwiap82wpar5b225bs8wig8c7xva-go-1.9.2/share/go"
GOTOOLDIR="/nix/store/0b91dwiap82wpar5b225bs8wig8c7xva-go-1.9.2/share/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build492100358=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
  • vim-go version:
    Newest? I just did a PlugUpdate

  • vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

I'll run down a reduced vim in the near future. In the meantime, c.f. https://github.com/nyarly/dotfiles/tree/master/neovim/.config/nvim

@nyarly nyarly changed the title File switching appears to take time proportional to GOPATH size File switching appears to take time proportional to number of open buffers [edit] Jan 24, 2018
@nyarly
Copy link
Author

nyarly commented Jan 24, 2018

@fatih This is a follow-up to a tweet earlier today.

@arp242
Copy link
Contributor

arp242 commented Jan 28, 2018

This seems to work fine for me.

Could you please try and reproduce this with a minimal vimrc? This sounds like an autocmd misbehaving or firing multiple times or some such, but I'm not going to go through you huge vimrc directory to find that for you.

@arp242
Copy link
Contributor

arp242 commented Feb 5, 2018

I'll close this for now due to lack of feedback. Feel free to comment if you have further problems or questions and we can reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants