-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TabNine consumes excessive CPU for extended periods #24
Comments
Does the high CPU usage stop once you stop typing? If so, it's likely TabNine updating the index in the background to reflect the changing state of the current file. This process is not very efficient at the moment, and is a high priority for improvement within the next month or so. |
Thanks for the response. No, the high CPU usage continues even when Sublime is in the background. I tried to see if there was a correlation between typing in Sublime as well as saving changes to disk when TabNine wasn't consuming much CPU, but there doesn't seem to be one: CPU usage it briefly jumps a bit but it doesn't begin one of these extended periods (I haven't measured it, but 10s of minutes) of maxing out a core. |
This could be caused by an issue which I just fixed which could cause indexing threads to get stuck in an infinite loop. Once I release the fix I'll comment here and you can let me know if it fixed the problem. I plan to include better error reporting in the next release as well. In the meantime, as a workaround you could try creating a Thanks for the report. |
Thanks. I'll keep an eye out for the update. |
The update is released! (Full changelog) Unfortunately I did not include the improved error reporting in this release. |
Hello, I'm using version 1.0.10, but the high CPU usage bug seems to be still present. I've recorded the CPU usage while Sublime was in the background: https://transfer.sh/vj81U/tabnine.mov . This is on latest macOS Mojave on a Macbook Pro. Edit: Another data point: I killed the TabNine process by hand and when I started typing it was recreated, but now it doesn't consume CPU while in background. |
The CPU usage seems a little better these days. The TabNine process isn't usually pegging a core at 100%. It does tend to hang between 20% and 70% for extended periods however. |
Just an update that recently, it's been hanging closer to 75% a lot of the time. This is with and without any interaction with SublimeText. I notice it because my system will slow if there's something else competing with it for large amounts of CPU. The most recent example is when I started up Sublime, TabNine hung around 70-75% CPU for about 10 minutes. I took a process sample via Activity Monitor around which point (could easily be coincidence) the CPU % rose to around 120% for a few minutes. Then it dropped down to 0-10%. Maybe this is normal startup behavior, but it sometimes happens even when Sublime has been running for a while. If there's any way to get debug logging or performance profiling, I'm happy to take a look. I've uploaded the process samples in case they're helpful: Idle High CPU: Idle Ultra-high CPU: Idle Low CPU: |
Getting the same issue with the deoplete-tabnine plugin in vim. The log doesn't appear to be getting thrashed though.
|
35% of memory is roughly 5GB on my system |
I'm seeing the same issue on macOS 10.14.2 with Sublime Text 3, even when I'm not using Sublime or modifying the repo with the command line. 99% CPU usage, 2.2 GB memory usage. |
@zxqfl Is TabNine abandoned already? This issue is a dealbreaker and I cannot use TabNine even though I paid for it. |
Yeah, I recently had to remove it so that my battery would last more than an hour. It's too bad, because this is the only thing keeping me from buying it. |
TabNine is not abandoned. Is the repository causing this issue open source? This may allow me to replicate and fix the issue. |
I'm sorry for the inconvenience. You can contact me at jacob@jacobjackson.com to receive a full refund. |
As a follow-up, after removing TabNine I discovered that Sublime was burning CPU for a different reason: a Thus I may have blamed TabNine unfairly due to it being installed around then same time that this issue cropped up. I've re-installed it and will report back if the high CPU usage returns. |
But as you can see on my post above it also happens on a completely unrelated editor and without that one going nuts. (VSCode) So I wouldn't close the issue. |
No, I'll leave it open for the other issues. I'm not sure mine is resolved either. |
@zxqfl Any progress? |
@zxqfl Is there any chance you can share the source code with me so I can diagnose this? It's getting really annoying. |
I disabled it for now because on some projects I've had a constant 100% CPU usage on one core I couldn't stop.. |
I'm working on open sourcing the code that TabNine uses to index projects. Once this is done, you'll be able to investigate the issue yourself if you wish. In the meantime, I can look into it if you can provide steps that I can use to reproduce the issue. |
Other people who find this issue: Check or think whether it might be an LSP server. Personally sometimes the Rust LSP server triggered by TabNine consumes all my cores to build the project in the background. One of my processor monitoring apps attributes this CPU to Sublime rather than the LSP server process because it's under Sublime in the tree. I'm not sure what Activity Monitor shows by default. This isn't a problem with TabNine though. Anyhow if you're having CPU usage issues consider whether this might be the case and maybe you want to ditch your LSP server and just use raw TabNine with |
I'm a new user giving TabNine a try and experiencing this same issue. |
Same with me: macOS, Emacs, and TabNine 2.0.4 |
this is happening for me too. I can provide more information if it helps |
Is there any way to provide logs that could help debug this?
|
When using vscode, the CPU usage does not reach 70% when inputting, causing the computer to be stuck. |
I'm seeing the same kind of issue. CPUs are being maxed out for minutes at a time.
update on 2019-09-26: I have 126gb of memory and after |
Happening to me as well. Also, the completion are slow to arrive and halt the PC at time. This has started happening recently. I am using Emacs with Spacemacs configuration. |
Hey @zxqfl - what can we do to get this issue looked into? TabNine is amazing, but I'm finding I have to terminate it to save battery/energy. |
been using via coc.nvim, disabling after experiencing the same, and then seeing this on answered thread. |
I'm having the same issue on an ec2 t2.medium instance with the tab nine vim plugin. This seems to completely lock up my instance every few hours, to the point where I need to reboot it to continue. |
I've been having the same issue. I'm on macOS Mojave using VSCode. As a temporary fix, I've disabled TabNine on a per-workspace basic, because I use VSCode to type my notes and do programming at school and the battery life was getting really bad (~ 2 and a half hours). |
You can disable TabNine Local feature in TabNine::config. |
Possibly related, I can't even open the config on my work machine. Whenever I type TabNine::config it opens the browser yes, but the page load times out and TabNine pegs all CPU cores to 90% until I kill it. EDIT: and that's 64 logical cores so it's not like the problem is that the PC is too weak... |
I'm getting this when I'm just writing Markdown. It pegs the CPU while I'm typing, and then goes back to idle. I'm using the |
By default, tabnine seems to use the half of the available cores: for example, CPU usage of However, sometimes CPU usage of TabNine exceeds 300% while editing a python file in power saving mode; the editor is Neovim and LSP is disabled. Is it possible to set the number of threads? $ TabNine -v
TabNine 2.1.20 (x86_64-unknown-linux-musl) |
i have the same issue in mac book pro + tabnine+ pycharm |
Hi All, we have a fix in beta (version 2.3.4) for excessive CPU and memory consumption by TabNine. |
I have no such settings in the VS-Code extension |
Here is
|
It is normal memory usage. |
@drorweiss I've been using the 2.3.4 beta on Windows 10 & Visual Studio code for a week now and am happy to report that CPU usage is normal. I'm no longer encountering the problems I've reported in #148 . |
Thanks, @cstuder |
Were compromises take taken to allow this? And has this been included in version 2.3.5 (I've enabled beta and for me the CPU usage is still very high even though I'm only using TabNine Cloud)? |
Hi @NilsIrl
Not really. The only "compromise" is that occasionally, TabNine would stop itself for a very brief period to prevent consuming excessive resources.
Yes.
CPU usage can get high for short periods of time. Do you see high CPU usage for long periods of time? |
Yes, generally after I'm typing it is still high. Right now though I can't get it to go over 20%. What I'm going to assume is that yesterday for whatever reason it was still using TabNine local even though I had told it not to. And that with a system restart the setting somehow got applied. So for me, assuming the current behavior doesn't change, I would consider it fixed. |
on macbook pro 16 inch intel, macos version 12.6.1..it seems the same issue I use vscode... does it fixed? |
I just come to say this. It happens again right now with the latest version. Is there any solution for this? |
Hi |
I'm using TabNine 1.0.9 in SublimeText 3.1.1 on OS X 10.13.6.
Much of the time, the TabNine process shows that it's using 100-120% CPU. The rest of the time it bounces between 0% and 40% CPU. I'm not sure what is causing this; I thought it might be related to backup activity causing a lot of filesystem events, but now I'm not sure.
Assuming this is not expected behavior, I'm happy to help troubleshoot this.
I should add that I really like TabNine's functionality, so I've been putting up with the high CPU except when running on battery.
The text was updated successfully, but these errors were encountered: