codota / tabnine-sublime

Tabnine Autocomplete AI: JavaScript, Python, TypeScript, PHP, C/C++, HTML/CSS, Go, Java, Ruby, C#, Rust, SQL, Bash, Kotlin, Julia, Lua, OCaml, Perl, Haskell, React
https://www.tabnine.com/install/sublime
MIT License
194 stars 36 forks source link

Crazy CPU usage #34

Open adamchainz opened 5 years ago

adamchainz commented 5 years ago

In the two days since installing tabnine-sublime, I've heard my macbook's fan running on hard three times. Each time, when I checked Activity Monitor, the culprit was TabNine and I've had to kill it. There isn't any related output in the sublime console that I can see.

I have some large repos open, like https://github.com/django/django .

My package dir shows version 2.0.2 of the binary:

$ tree
.
├── Default.sublime-keymap
├── LICENSE
├── Main.sublime-menu
├── Preferences.sublime-settings
├── README.md
├── TabNine.py
├── TabNine.sublime-settings
├── binaries
│   ├── 1.0.7
│   │   ├── i686-apple-darwin
│   │   │   └── TabNine
│   │   ├── i686-pc-windows-gnu
│   │   │   └── TabNine.exe
│   │   ├── i686-unknown-linux-gnu
│   │   │   └── TabNine
│   │   ├── x86_64-apple-darwin
│   │   │   └── TabNine
│   │   ├── x86_64-pc-windows-gnu
│   │   │   └── TabNine.exe
│   │   └── x86_64-unknown-linux-gnu
│   │       └── TabNine
│   └── 2.0.2
│       └── x86_64-apple-darwin
│           └── TabNine
└── package-metadata.json

10 directories, 15 files
flinz commented 5 years ago

I've been experiencing the same here, just having a small size project open causes tabnine to use CPU excessively for a long period.

kinoute commented 5 years ago

Same here. TabNine constantly at 90%. Is there any way to disable TabNine on a particular project?

adamchainz commented 5 years ago

@kinoute I don't believe Sublime providers a generic way to disable a package per project. It would need to be built in TabNine and it doesn't seem to have such a setting

@zxqfl I've had less incidents of high CPU recently but still one the end of last week. I see I'm now on version 2.0.4 of the binary. I have stuck with TabNine though because it's completions are just so much better, it's helping me autocomplete whole lines of code!

Miloshes commented 5 years ago
Screenshot 2019-08-13 at 10 08 02

TabNine uses 196% of my CPU 😄I am on Macbook Pro Retina, 13-inch, Early 2015 and the fan is running constantly. Even when I am not actively coding..

breck7 commented 5 years ago

I'm also experiencing this. It would be great if there were a Tab-Nine command to globally stop/start it.

adamchainz commented 5 years ago

Just saw it taking CPU again, killed it, and got some more logging from the debug panel:

TabNine expected prefix "" but found prefix "N", falling back to substituting from word beginning: "N"
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 610, in on_selection_modified_async
    callback.on_selection_modified_async(v)
  File "/Users/chainz/Library/Application Support/Sublime Text 3/Packages/TabNine/TabNine.py", line 301, in on_selection_modified_async
    choice = self.choices[i]
IndexError: list index out of range
TabNine expected prefix "" but found prefix "N", falling back to substituting from word beginning: "N"
TabNine expected prefix "is" but found prefix "ismo", falling back to substituting from word beginning: "ismo"
TabNine subprocess is dead
Restarting it...
TabNine: starting version 2.0.4
breck7 commented 5 years ago

This is still happening. Often seems to happen when I change a few hundred files at once.

I would LOVE an option to quickly disable/enable tabnine globally. Right now I need to keep Activity Monitor open to occasionally kill it when my computer starts to turn into lava.

breck7 commented 4 years ago

Still getting CPU spikes. I'm close to just saying screw it and uninstalling TabNine until there's a better strategy here.

breck7 commented 4 years ago

Warning: don't use TabNine during high winds and dry conditions. It may cause your computer to burst into flames.

:(

yarnball commented 4 years ago

I'm hitting 200-300% usage in OSX using my 2019 Macbook pro 15.

Anyone found a work around?

sophieforceno commented 4 years ago

Anyone found a work around?

Other than uninstalling it, no.