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

Improve performance on typing

Open otavioschwanck opened this issue 4 years ago • 5 comments

Using company tabnine, the typing feels very laggy, the letters take some time to appears, don't feel smooth like others backends (like LSP or dabbrev).

Using on neovim-qt or vscode ( installed only for test propose, dont judge me hahah ) the type feels smooth (the time between the key press and the lettter show and editor feels like 0ms ).

I dont know how to do it, but maybe change it to something more async.

Edit:

My PC is OK, i7 8gen, 16 ram, ssd nvme 2

otavioschwanck avatar Nov 24 '20 14:11 otavioschwanck

Which company frontend are you using? I found that company-box is really slow while with the one that Doom Emacs configures by default it's really responsive.

NathanLovato avatar Nov 26 '20 16:11 NathanLovato

As @NathanLovato said, the company frontend being used does make a difference.

Also, check to see if TabNine local deep learning completion is enabled. This is in the README known issues:

TabNine's local deep learning completion might be enabled by default. It is very CPU-intensive if your device can't handle it. You can check by typing "TabNine::config" in any buffer (your browser should then automatically open to TabNine's config page) and disable Deep TabNine Local (you will lose local deep learning completion).

TommyX12 avatar Nov 26 '20 16:11 TommyX12

I'm not using company-box, just (company-pseudo-tooltip-frontend company-echo-metadata-frontend).

Without deep learning, tabnine loses a lot of potencial. WIth vscode and nvim, works fine with deep learning, the lags is when typing. With LSP (like solargraph), dabbrev, robe, etc, it not occurs.

I'm also using gccemacs, but tested on emacs 27 too, same thing.

otavioschwanck avatar Nov 30 '20 22:11 otavioschwanck

Is there any reason not to implement async with company-tabnine?

MatthewZMD avatar Dec 04 '20 04:12 MatthewZMD

Typing prose in an org-mode file makes my CPU 100% with local-mode activated

image

image

How could I improve this?

Edit: I deactivated local-mode and restarted Emacs a couple of times and the CPU stays in reasonable values

image

maikol-solis avatar Apr 24 '22 12:04 maikol-solis