roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

slow response on completion for asyncio module #126

Closed NoAnyLove closed 7 years ago

NoAnyLove commented 7 years ago

A simple example,

import asyncio
asyncio.[wait for completion here]

The completion for asyncio module is slower than for other module. Especially on Windows, it even takes about 10 seconds at the first time.

It seems like a bug in the upstream davidhalter/jedi. I tried YouCompleteMe and jedi-vim, both of them have a perceptible delay when complete the asyncio module. But on the other hand, the deoplete-jedi behaves very smooth on the same moudle.

I wonder if it's possible to do some improvement on this completion. Thanks.

roxma commented 7 years ago

According to the log files. It's the parameter expansion support causing the significant delay.

More specifically, https://github.com/roxma/nvim-completion-manager/blob/33c77a1804d90a2169bf46bc8ca02111961ff99b/pythonx/cm_sources/cm_jedi.py#L124

If I remove it. the delay is about 2 seconds at the first time on my nvim.

This behavior only affect the first time completion. I won't fix it.