Closed RicherMans closed 6 years ago
with print(
is intersting one, I cannot reproduce it
project config with python3.6 venv
{
"settings": {
"python_virtualenv": "/Users/sr/.virtualenvs/platform"
}
}
So when opening local files it does not appear to be a big problem. But when I open a file in a sshfs directory, jedi becomes noticeably slower. I personally don't understand why that is, since I would expect that jedi still searches for my local packages for autocompletetion, therefore does not need to wait for the file on theserver.
Here is an example:
I type as fast as I can in that example, but it always stucks / the autocomplete of most functions is quite delayed
ok, I got. Lets try to measure the performance. I think we should use "jedi" lib for this, without ST3.
Could you please do next:
pip install jedi
print()
params
import sys
import jedi from jedi.api import environment
source = ''' import numpy as np print('''
def comp(): python_interpreter = sys.argv[1] env = environment.Environment( environment._get_python_prefix(python_interpreter), python_interpreter)
script = jedi.Script(source, 3, len('print('), '', environment=env)
return script.call_signatures()[0].params
print(list(comp()))
4. run `time python path/to/test_script.py <path to yours project interpreter>`, where
_<path to yours project interpreter>_ is a path to interpreter that you used in SublimeJedi settings.
And please share the results.
Thanks!
Hey @srusskih , I done the requested trials.
When running the script from a local place e.g., ~/test_script.py
, I get:
[<Definition param value>, <Definition param ...>, <Definition param sep>, <Definition param end>, <Definition param file>, <Definition param flush>]
real 0m0.524s
user 0m0.310s
sys 0m0.037s
However, when putting the script to a remote server, over sshfs, I get:
[<Definition param value>, <Definition param ...>, <Definition param sep>, <Definition param end>, <Definition param file>, <Definition param flush>]
real 0m1.936s
user 0m0.326s
sys 0m0.055s
But still I dont think that a difference in time of 0.5s to 2s matters that much. In sublime it feels rather than ~2-5 seconds delay, on top of that it hangs during the execution.
yeah, my non perfect implementation (and sublime) gives and overhead :(
have couple ideas, but not sure, if it would works:
print
showed by @RicherMans Hey @srusskih Thanks for the suggestions. I tried:
auto_complete
in the config does not help :(auto_complete_delay
in the config to some very high value (e.g. 3s), which prevents the future errors, but still is pretty laggy
4.That worksOverall, thanks for your efforts!
@RicherMans thanks for reporting (:
Hey there, I personally only work via remote on a server. The remote drive is located nearby, thus usual pings or general access over sshfs is pretty fast. The old version 0.12 didn't have much lag, but the newer versions since 0.13 all lag after typing a single character, no matter which one. From time to time it also throws the error:
Also, autocompletion is delayed during typing. e.g., if one types
print(
, after some seconds the string gets completed withvalue
even though one might already wrote something. It's an annoying little bug.Is there any good recommendation besides settings up remote python executeables?