Skip to content

Slow autocomplete performance #2049

Closed
Closed
@fvosberg

Description

@fvosberg

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

I've created a small vimrc with vim-go,
opened a Go file "github.com/tarent/loginsrv/login/handler.go"
Jumped to line 38 (first line of func NewHandler)
Inserted config.
And hit for autocompletion.

What did you expect to happen?

The omnicompletion pop up to open fast.

What happened instead?

Waited several seconds (round about 7s) for the pop-up menu to show up. (Even after a second time, when I expected a sort of cache to be built)

Configuration (MUST fill this out):

  • vim-go version: Current version installed with plug.

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

if empty(glob('~/.config/nvim-debug/autoload/plug.vim'))
	silent !curl -fLo ~/.config/nvim-debug/autoload/plug.vim --create-dirs
		\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
	autocmd VimEnter * PlugInstall | source ~/.vimrc.test
endif

call plug#begin('~/.config/nvim-debug/plugged')
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()

set nocompatible
set packpath=~/.config/nvim-debug,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,~/.config/nvim-debug/after
packloadall!

syntax on
filetype plugin indent on
set number
  • Vim version (first three lines from :version):
NVIM v0.3.2-24-gc8e7a44
Build type: Release
LuaJIT 2.0.5
  • Go version (go version):

go version go1.11.2 darwin/amd64

  • Go environment (go env):
GOBIN=""
GOCACHE="/Users/frederikvosberg/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/frederikvosberg/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/r1/tlbhy0rx3y76wtmr4k1l72qw0000gn/T/go-build847603310=/tmp/go-build -gno-record-gcc-switches -fno-common"

Which options do I have to speed this up? Did I miss some documentation?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions