cquery-project / vscode-cquery

cquery plugin for Visual Studio Code
54 stars 16 forks source link

VS Code hangs with the renderer at 100% CPU when indexing large new project #58

Open umanwizard opened 5 years ago

umanwizard commented 5 years ago

The reason seems to be that since the default config places the cquery cache in the project directory, VSCode tries to watch all the files in the cache as cquery adds them. Changing the cache directory to be outside of the workspace fixes the issue.

bdeeming commented 5 years ago

I have observed this too (on Linux). The help text in the settings is misleading:

Cquery: Cache Directory Absolute path to the directory that the cached index will be stored in. Try to have this directory on an SSD. If not explicitly set, this will be automatically populated with the extension cache directory.

If left unconfigured it lands in the .vscode/cquery_cached_index directory within the workspace, not the extension cache directory (which would be good).

Cache directories are project-wide, so this should be configured in the workspace settings so multiple indexes do not clash.

Not directly related to the issue at hand, but this appears to be out of date also. My cache directory appears to automatically put subdirectories within my cache directory that are derived from the workspace path, so there are no clashes when configured in the user settings (a good thing, but this statement should probably be removed/updated).

umanwizard commented 5 years ago

I have taken "on macOS" out of the title since other people are reproducing this on Linux.

bdeeming commented 5 years ago

One more observation: It appears that when leaving the setting blank in User Settings, it automatically populates "cquery.cacheDirectory": "${workspaceFolder}/.vscode/cquery_cached_index/" into the Workspace Settings file. You can delete the added line, then save it, and then it puts it straight back again.