Search code examples
python-3.xspydercode-completion

Spyder 4 code autocompletion with Jedi is (still) slow within the editor


I am using Spyder 4 with Jedi for code autocompletion inside Anaconda3:

# Name                    Version                   Build
spyder                    4.1.4                    py37_0
spyder-kernels            1.9.2                    py37_0
jedi                      0.17.1                   py37_0
anaconda-client           1.7.2                    py37_0
anaconda-navigator        1.9.12                   py37_0
conda                     4.8.3                    py37_0
conda-build               3.18.11                  py37_0
ipython                   7.16.1           py37h5ca1d4c_0
python                    3.7.7                h81c818b_4

But the code completion within the editor is sometimes inefficient, like when typing self.<tab>. I find myself coding in IPython 7.16.1 as it is very smooth and copying back to the editor. I have heard of the new Kite integration since December 2019, but it is a bit fishy, which makes me ask: how can we make Jedi run faster in the editor? any better solutions/alternatives?


Solution

  • (Spyder maintainer here) We're aware that code completion with Jedi is slow for large files (i.e. more than 1000 lines of code). For now the only solution is to break down your files into smaller ones.

    We hope to fix that in the future.