Skip to content
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

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

Open
umanwizard opened this issue Nov 16, 2018 · 3 comments

Comments

@umanwizard
Copy link

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
Copy link

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 umanwizard changed the title VS Code hangs with the renderer at 100% CPU when indexing large new project on macOS VS Code hangs with the renderer at 100% CPU when indexing large new project Nov 18, 2018
@umanwizard
Copy link
Author

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

@bdeeming
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants