hi,

I had the same latency problem when using kite, when I type import datetime 
as dt : it's pretty much instant, but when I type dt.  I have to wait 
around 15 s before it shows results, idk if it's because of my computer or 
it's a common issue. 


Le mercredi 16 juin 2021 à 19:31:46 UTC+1, [email protected] a écrit :

> Hi Vicent
>
> Thanks.
> I just upgraded my Anaconda installation to 5.0.4 using:
>
> conda install --channel conda-forge spyder=5.0.4
>
> Then I tried carrying out your fix. 
>
> It has helped slightly, now it takes about 5 seconds for:
> np.
> to show the autocompletion list opposed to about 30 s.
>
>
> The line
>
> import numpy a
>
> Now autocompletes to:
>
> import numpy as np
>
> [image: 62a.png]
>
> But
>
> np.
>
> still takes about 5 s to display. An improvement of the 30 s lag from 
> before but still slower than it should.
> [image: 62a2.png]
>
> In comparison:
>
> import datetime as dt
> dt.
>
> is pretty much instant:
>
> [image: 64.png]
>
> Kite gives the most commonly used methods/attributes at the top followed 
> by everything else ordered alphabetically.
> I've noticed from time to time, Kites most commonly used recommendations 
> are a bit ropey in general.
>
> However for a numpy array in particular it is not exactly giving correct 
> recommendations for an array instance.
> In the below, x is a numpy array instance. 
>
> In this case it gives str methods which do not apply to the object x:
> [image: 62.png]
>
> The list of methods/attributes below this are the correct ones belonging 
> to the array:
>
> [image: 63.png]
>
> Seems there is some confusion to its recommendations.
>
>
>
> On Tuesday, June 15, 2021 at 4:54:58 PM UTC+1 [email protected] wrote:
>
>> Hey, I had the same latency problem and found a way to solve it. For 
>> information, I use Spyder 5.0.0.
>>
>> 1) Open Kite.
>> 2) Click on the parameter button in the bottom right corner.
>>
>> [image: googlehelp1.png]
>>
>>
>> 3) Go to Plugins.
>>
>> [image: googlehelp2.png]
>>
>> 4) Within the category "AVAILABLE EDITOR PLUGINS", install the Spyder IDE 
>> one.
>>
>>
>> [image: googlehelp3.png]
>>
>> I did this and autocompletion worked again.
>>
>> I hope this will help you.
>>
>> Best regards.
>> Le dimanche 2 mai 2021 à 22:05:18 UTC+3, [email protected] a écrit :
>>
>>> It is still extremely slow without Kite installed. I guess it is related 
>>> to this issue de to be resolved in Spyder 5.0.3.
>>>
>>> Completions extremely slow · Issue #15042 · spyder-ide/spyder · GitHub 
>>> <https://github.com/spyder-ide/spyder/issues/15042>
>>>
>>> On Saturday, May 1, 2021 at 10:49:58 AM UTC+1 yfprojects wrote:
>>>
>>>> Hi,
>>>> the *ipython* console/ *qtconsole* never uses *Kite*. As far as I know 
>>>> Kite only supplies extra completions. The display of the doc strings and 
>>>> the method/function signature is provided by another linting tool - 
>>>> probably *jedi*. The whole linting and completion functionality is 
>>>> bundled in a *python language server *(pyls). The server should 
>>>> provide completion options along with kite's completion. If kite is too 
>>>> slow on your PC, try to disable it.
>>>>
>>>> Kind regards,
>>>> yfprojects
>>>>
>>>> [email protected] schrieb am Freitag, 30. April 2021 um 12:04:29 UTC:
>>>>
>>>>> I have been using both JupyterLab 3.0.14 and Spyder 5.0.1 and I 
>>>>> noticed that the experience with Spyder 5.0.1 is a bit frustrating mainly 
>>>>> because of the code auto-completion. This may be more of a Kite than a 
>>>>> Spyder issue...
>>>>>
>>>>> In JupyterLab, the code completion does not automatically display but 
>>>>> will display when tab is pressed. For example if I import numpy as np and 
>>>>> type in:
>>>>>
>>>>> np.↹
>>>>>
>>>>> I get a list of all the statements/functions/classes I can pull from 
>>>>> the numpy library.
>>>>>
>>>>> [image: 1 jupyterlab.png]
>>>>>
>>>>> Then if I type in a function or class and press shift and tab I get 
>>>>> details about the input arguments. e.g.
>>>>>
>>>>> np.array⇧↹
>>>>>
>>>>> [image: 2 jupyterlab.png]
>>>>>
>>>>> This works pretty well for numpy, matplotlib, pandas...
>>>>>
>>>>> [image: 3 jupyterlab.png]
>>>>>
>>>>> Moving onto Spyder 5.0.1 with Kite...
>>>>>
>>>>> If I import numpy as np and then type np. in the script nothing 
>>>>> displays.
>>>>>
>>>>> [image: 4 spyder.png]
>>>>>
>>>>> I need to run the script with the solo command import numpy as np 
>>>>> before using any autocompletion in the script with numpy (partially) 
>>>>> works.
>>>>>
>>>>> [image: 5 spyder.png]
>>>>>
>>>>> After about a minute latency the following displays... 
>>>>>
>>>>> [image: 6 spyder.png]
>>>>>
>>>>> [image: kite.PNG]
>>>>>
>>>>> I can then select from the list the class or function that I want:
>>>>>
>>>>> [image: 7 spyder.png]
>>>>>
>>>>> Next Spyder has both the Script Editor and the Console. If I now go to 
>>>>> the Console and type in np. nothing happens. If I type in np.↹ then the 
>>>>> following autocompletion shows. I think this is Jedi opposed to Kite...
>>>>>
>>>>> [image: 9 spyder.png]
>>>>>
>>>>> Now if I type in a class/function with open parenthesis. This seems to 
>>>>> work with Kite both in the script editor and console.
>>>>>
>>>>> [image: 10 spyder.png]
>>>>>
>>>>> The performance is slightly better for matplotlib. There is about a 30 
>>>>> s delay with plt. opposed to about 60 s with np. Either way the delay is 
>>>>> still too long hindering productivity.
>>>>>
>>>>> [image: 11 spyder.png]
>>>>>
>>>>> However once again typing plt. into the console does not generate a 
>>>>> Kite autocompletion.
>>>>>
>>>>> [image: 12 spyder.png]
>>>>>
>>>>> Typing in plt.↹ generates a Jedi autocompletion.
>>>>>
>>>>> [image: 13 spyder.png]
>>>>>
>>>>>
>>>>> If I type in "import numpy as np" as an earlier line in the script. 
>>>>> Should np. not generate autocompletion both later on in the script and in 
>>>>> the console using Kite without the latency issue (without previously 
>>>>> running the script).
>>>>>
>>>>> Also can the behaviour of Kite be changed so it doesn't pop up 
>>>>> automatically and only pops up (no delay) if requested? i.e. uses the 
>>>>> same 
>>>>> shift and tab shift keyboard combination as JupyterLab.
>>>>> np.↹
>>>>> np.array⇧↹ 
>>>>> i.e. exhibits similar behaviour (to Jedi) and the code competition in 
>>>>> JupyterLab.
>>>>> Alternatively, if that is not possible to do with Kite is there a way 
>>>>> to use the code completion from JupyterLab within Spyder instead of Kite?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/cff06a05-232c-44aa-b9c4-4ed61bf7e241n%40googlegroups.com.

Reply via email to