-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jedi freezes ST and causes very high RAM usage. #271
Comments
I can confirm that some recent release of Jedi caused a big hit to performance. ST now hangs when trying to populate the autocomplete list, often for as long as a second. I've been using this plugin for about 5 years and this has never been an issue before. OSX, ST 3176, Jedi 0.13.4. |
@deathaxe Sorry, but I can reproduce the issue with this steps. @deathaxe @kylebebak Sorry for asking, but, could You please make a "fresh installation" of ST3 (no plugins) and install ONLY Jedi to make sure this is Jedi issue ? Thanks a lot! |
The issue is 100% reproducible with my setup. Guess it's somehow related with the provided PYTHONPATH and the dependencies being passed to Jedi.
Reading the console error message carefully makes me wonder about the line containing the python3.3. Jedi runs a python deamon, which runs on the external interpreter (3.7) here. Maybe one of the sys.path entries conflicts with the standalone python 3.7? Maybe I even got the culprit - not sure. ST's sys.path includes python3.3.zip. Looks like the python 3.7 tries to use it rather than its own stdlib and crashes in the I disabled my script and put all sys.path entries except the python3.3.zip to jedi's "python_package_paths". Seems to work. |
I haven't tried with a fresh installation, but let me explain what I did. I removed SublimeJEDI, started typing some characters into a function call, and the autocomplete list appeared instantaneously. I then reinstalled SublimeJEDI, started typing the same characters into the same function call, and Sublime Text hangs for nearly a second before showing the autocomplete list. In my opinion, this is convincing evidence that SublimeJEDI is causing the slowdown. I've isolated the variable that causes the slowdown. The variable is whether or not SublimeJEDI is installed. This didn't start happening until a couple of weeks ago, maybe less. What do you think? |
@kylebebak first completion is slow - yeap, that's ok. next completion should be much faster. But, I still can't reproduce editor slowdown to fix the issue. That's why I'm asking to experiment. |
@deathaxe thanks. seems like |
I made a small video to show the slowdown, where I type "url" as an argument into a function 4 separate times. Each time I'm typing "u-r-l" as quickly as I can, but ST hangs visibly for more than half a second after "u" appears but before "r" appears. I've been using Jedi for years and I've never seen slowdown like this. I think this demonstrates that this is not just a problem with slowdown on the first completion. Each time it's just as slow. This project has only 2 modules, with a total of <300 lines of code. @deathaxe |
Just added a The culprit for high RAM was the second line in my case.
|
Hmm... My settings for Jedi are just the default settings. In particular, Just typing and retyping various parts of the following causes slowdown that doesn't get better with repeated attempts. But maybe this is to be expected. @srusskih Any ideas? import webbrowser
webbrowser.get('abc').open(url) |
I'm having the same issue with the same error:
Anything I can do to help figure out what's going on? And is there a temporary workaround? |
Same issue (Ubuntu 18.04, fresh installation of Sublime), even though my "python_interpreter": "/usr/bin/python3":
|
@srusskih Is there anything I can do to help locate this issue and reproduce it? I've disabled Sublime Jedi because of the slowdowns and I'm missing it. |
@mew1033 do you have a way how the issue can be reproduced? |
reproducible case is in #276 👍 but didn't measure the RAM... only slowdown |
any update on the issue? with jedi st is literally unusable with up to 5 seconds of delay every time I try type anything. |
yeah, I recently noticed this, and I had to remove the package, but this package was pretty useful and I hope I can continue using it :/ |
@barathbheeman sounds really bad, it looks like Jedi (jedi lib) by it self are really slow on your env. |
as workaround feel free install one of previous versions :( |
Have found this davidhalter/jedi#1242 |
I only just realized how bad this issue was. Big sorry for that. I therefore did a release immediately. (0.13.2) |
please check a new release |
I'm still having slowdowns on the latest release. Windows 10, Sublime 3, Python 2. |
I know this may not be helpful, but I can also still confirm that auto-complete for Python files using Sublime Jedi is much slower than auto-complete for any other language I use in ST. Entering If I retype Who knows if this is an issue with Sublime Jedi or with Jedi, but this is obviously not how this is supposed to work. And again, in the past (before August 2018 for me) lag was never a problem with this plugin. |
I added the following to "auto_complete_triggers": [{"selector": "source.python", "characters": "."}],
"auto_complete_selector": "-", This is nice, because ST no longer lags like crazy trying to fetch the Jedi auto-completions, and you still get the info popup if you hover over text, and you get auto-completions for methods and properties and anything that's preceded by But, it kills the rest of Sublime Text's auto-complete functionality for your Python files, which is totally unacceptable. The readme even suggests doing this not just for your Python files, but in all your ST files, by placing the above text in The workaround to me seems to be creating a setting that only disables auto-complete for Sublime Jedi, while keeping the rest of its functionality. I will look into doing this. |
@kylebebak thanks for a feedback. thanks. will try to look what I can find. |
Description
from collections import S
into the first line.ST suddenly freezes. After a while the console shows some output error. The CPU usage of the plugin_host.exe increases to 100% for one core. The RAM usage increases up to 1.2GB.
I was faced to that issue several times. Sometimes RAM usage even increases and stays at 2.5GB!
Console Output
TaskManager
Infos
The text was updated successfully, but these errors were encountered: