Skip to content

[BUG] vim freeze when there are too many filesΒ #535

@moetayuko

Description

@moetayuko

Describe the bug

When the directory contains a large number of files (>5k in my experiments), launching coc-explorer will freeze vim entirely.

Result from CocInfo

(Obtained in another directory with fewer files, otherwise vim freezes and there's no way to run the command)

## versions

vim version: VIM - Vi IMproved 9.0 9000000
node version: v16.16.0
coc.nvim version: 0.0.81-2522eee5 2022-06-14 19:03:29 +0800
coc.nvim directory: /home/dianlujitao/.dotfiles/vim/.vim/plugged/coc.nvim
term: dumb
platform: linux

## Log of coc.nvim

2022-07-27T12:55:07.366 INFO (pid:3491417) [services] - registered service "languageserver.bash"
2022-07-27T12:55:07.417 INFO (pid:3491417) [services] - registered service "highlight"
2022-07-27T12:55:07.455 INFO (pid:3491417) [plugin] - coc.nvim initialized with node: v16.16.0 after 162ms
2022-07-27T12:55:07.638 INFO (pid:3491417) [attach] - receive notification: runCommand [ 'explorer', '--root-strategies', 'keep' ]
2022-07-27T12:55:07.689 INFO (pid:3491417) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_coc_helper_1',
  'BufDelete',
  2
]
2022-07-27T12:55:07.690 INFO (pid:3491417) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_explorer_2',
  'BufDelete',
  2
]
2022-07-27T12:55:08.215 INFO (pid:3491417) [attach] - receive notification: highlight []
2022-07-27T12:55:08.954 INFO (pid:3491417) [attach] - receive notification: highlight []
2022-07-27T12:55:10.959 INFO (pid:3491417) [attach] - receive notification: showInfo []

Steps to reproduce
Steps to reproduce the behavior:

  1. mkdir test && cd test
  2. touch {1..5000} or more files
  3. :CocCommand explorer
  4. Get your dead vim

Expected behavior

Vim works and files are properly listed in explorer's buffer

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions