tabnine-sublime icon indicating copy to clipboard operation
tabnine-sublime copied to clipboard

Crazy CPU usage

Open adamchainz opened this issue 5 years ago • 11 comments

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

adamchainz avatar Jul 29 '19 19:07 adamchainz

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

flinz avatar Aug 09 '19 07:08 flinz

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

kinoute avatar Aug 11 '19 17:08 kinoute

@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!

adamchainz avatar Aug 12 '19 13:08 adamchainz

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..

Miloshes avatar Aug 13 '19 08:08 Miloshes

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

breck7 avatar Aug 15 '19 18:08 breck7

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

adamchainz avatar Aug 16 '19 16:08 adamchainz

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 avatar Sep 06 '19 15:09 breck7

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

breck7 avatar Oct 13 '19 15:10 breck7

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

:(

breck7 avatar Oct 14 '19 14:10 breck7

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

Anyone found a work around?

yarnball avatar Jan 22 '20 22:01 yarnball

Anyone found a work around?

Other than uninstalling it, no.

sophieforceno avatar May 10 '20 15:05 sophieforceno