codota / tabnine-intellij

Jetbrains IDEs client for TabNine. Compatible with all IntelliJ-based IDEs. https://plugins.jetbrains.com/plugin/12798-tabnine
https://www.tabnine.com/install/intellij
MIT License
525 stars 67 forks source link

High memory usage #717

Closed Tib-z closed 6 months ago

Tib-z commented 6 months ago

Plugin version: 1.83.0 PhpStorm: Build #PS-241.15989.102, built on April 23, 2024 Runtime version: 17.0.10+1-b1207.14 aarch64 hw: Macbook air m1

Recently I noticed slowdown then found the vdb process to consume more than 4GB RAM. Not sure if this was the case before, but it doesn't make sense to use the same or more memory than all runnig IDEs alltogether. Switching model mode, excluding specific files (extensions), reinstalling tabnine did not change the situation.

PID    COMMAND      %CPU  TIME     #TH   #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS
11227  phpstorm     7.9   17:17.72 123   1    745   4343M- 0B     2346M- 11227 1     sleeping *0[316+]
11637  vdb          0.0   00:19.01 19    1    37    4086M- 0B     4079M- 11227 11632 sleeping *0[1]

gz#31448

(related to Zendesk ticket #31448)

TzufTabnine commented 6 months ago

Hi @Tib-z , How big is your workspace (in MB/GB) do you need to index all of it? Can you replicate the issue and send us the logs?

Tib-z commented 6 months ago

One of the projects (legacy) is relatively large about 1GB with vendor and static files + .git another 900MB. Indeed the project exists in different variations, plus I work on a number of Symfony microservices, so the total size that is indexed adds up pretty quickly, even if I try to ignore parts of the project. In my workflow it seems the problem is that the vector db is built on top of all existing projects/workspaces - if I understand correctly how it works.

update: I just installed again the tabnine plugin (I've uninstalled recently) and opened only one project. Using the .ignore file excluded everything but one folder that is ~90MB. The vdb memory usage instantly jumped to 4GB, then reindex the workplace and now is 3.7GB.

..but then limiting all legacy projects quite aggressively and reindexing them all (It seems the index was not removed even though the plugin was uninstalled and the .tabnine also with the binaries) slowly reduced the memory usage to 1.5GB, which is somewhat ok.