neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.43k stars 954 forks source link

Timeout when cancelling coclist #1533

Closed moetayuko closed 4 years ago

moetayuko commented 4 years ago

Result from CocInfo

## versions

vim version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 29 2020 20:24:33)
node version: v12.13.1
coc.nvim version: 0.0.74-6700e7468d
term: dumb
platform: linux

## Messages
Messages maintainer: Bram Moolenaar <Bram@vim.org>
## Output channel: snippets

Describe the bug

There's ~2s timeout when cancelling coclist with <esc>

I'm unsure if this is expected and the timeout can be changed, but I failed to find explanations from the doc.

Reproduce the bug

call plug#begin('~/.vim/plugged')
 Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
set nocompatible
  1. Launch coclist (e.g. :CocList commands, but it's reproducible with other sources too)
  2. Press <esc> to close, ~2s timeout is observed before it's closed.
chemzqm commented 4 years ago

Could be caused by your other vim plugin, we can't reproduce.

moetayuko commented 4 years ago

Thanks for your response, I double checked just now and found it reproducible on a fresh Debian docker image, here's the setup:

  1. docker run -it debian:stable
  2. Install vim, git, curl, etc. from apt
  3. Install Node.js v13.x following official guide
  4. Install vim-plug, run vim with the preceding .vimrc and :PlugInstall
  5. Reproduce the issue, the list did not close right after I press ESC.
chemzqm commented 4 years ago

Checkout https://github.com/neoclide/coc.nvim/wiki/F.A.Q#how-could-i-profile-vim Checkout :h g:node_client_debug to get log from vim8.

moetayuko commented 4 years ago

terminate vim right after starting profiling, for comparison: http://fars.ee/spLa start profiling, run :CocList commands, press esc after it's fully initialized, :q: http://fars.ee/9rlC