tbodt / deoplete-tabnine

Deoplete source for TabNine
256 stars 17 forks source link

Avoid loading JSON into string before loading it (and vice versa) #40

Closed oxinabox closed 5 years ago

oxinabox commented 5 years ago

I'm digging into why my nvim is currently having latency between keypresses. I don't think this was the cause, but I did notice some potential improvements:

Main change is to stop stop creating and decoding so many strings when doing the interprocess communications.

Other change is to to comment out the debug logging, because the call to repr allocates every time even when not debugging

tbodt commented 5 years ago

The encoding argument to Popen was added in Python 3.6, so I'm not sure I can take that. But it does make sense to remove the debug logs.

oxinabox commented 5 years ago

That is fair, I'll just leave this PR open for a few years. Current expectation is for Debain Stretch (the last debian release not to ship with <3.6) to exit LTS by June 2022. I think by that point one can assume noone is left without Python 3.6 and we can merge it.

Shougo commented 5 years ago

Python 3.6.1 is required for deoplete. So they are better changes.

tbodt commented 5 years ago

Sounds good then. Thanks for the PR!

Shougo commented 5 years ago

@oxinabox

I'm digging into why my nvim is currently having latency between keypresses.

You can disable Tabnine local for slowness.

oxinabox commented 5 years ago

@Shougo yeah for testing purposes, good idea

Shougo commented 5 years ago

I have disabled TabNine Local in my notebook.

oxinabox commented 5 years ago

What is "TabNine Local"? I thought I only used tabnine locally. as I never signed up for this new fangled cloud thing.

Shougo commented 5 years ago

Tabnine Local is enabled in the latest version of Tabnine. You can disable it in TabNine::config.

oxinabox commented 5 years ago

Oh Oh! That solved it completely.