We noticed a lot of slowness with python autocomplete. It seems like there's a regression with Jedi version 0.16.0+ in combination with pyls.
What changed
Downgraded jedi to version 0.15.2, the latest pyls version that supports it is 0.31.10.
pyls0.31.10 has an issue where it depends on ujson<=1.35, it also depends on python-jsonrpc-server>=0.3.2, however new versions of python-jsonrpc-server rely on ujson>=3.0.0, leading to problems with pip installation and the packages themselves. So I had to pin python-jsonrpc-server to 0.3.2.
Things seemed to work, however, I started facing issues with some lsp features. Turns out jedi relies on parso==0.5.2 but it doesn't pin it. So I decided to pin everything that pyls & its packages rely on. When I got to a working configuration pip list and took all the packages and pinned them in an install step before installing pyls and its packages.
I split installation into separate parts, it makes things a little slower but it makes things easier to read.
Test plan
I benchmarked completions, for larger packages like pandasnumpy and tensorflow this version is about 50% faster
Why
We noticed a lot of slowness with python autocomplete. It seems like there's a regression with Jedi version 0.16.0+ in combination with pyls.
What changed
Downgraded
jedi
to version0.15.2
, the latestpyls
version that supports it is0.31.10
.pyls
0.31.10
has an issue where it depends onujson<=1.35
, it also depends onpython-jsonrpc-server>=0.3.2
, however new versions ofpython-jsonrpc-server
rely onujson>=3.0.0
, leading to problems with pip installation and the packages themselves. So I had to pinpython-jsonrpc-server
to0.3.2
.Things seemed to work, however, I started facing issues with some lsp features. Turns out jedi relies on
parso==0.5.2
but it doesn't pin it. So I decided to pin everything that pyls & its packages rely on. When I got to a working configurationpip list
and took all the packages and pinned them in an install step before installingpyls
and its packages.I split installation into separate parts, it makes things a little slower but it makes things easier to read.
Test plan
I benchmarked completions, for larger packages like
pandas
numpy
andtensorflow
this version is about 50% fasterI tested all LSP features replit supports