microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.52k stars 1.55k forks source link

go to definition etc often takes tens of seconds to perform when ~/.config/Code is on NFS #4374

Open LinAGKar opened 5 years ago

LinAGKar commented 5 years ago

Type: LanguageService

Describe the bug

To Reproduce

  1. Open a folder with C/C++ Files
  2. Open a C/C++ file
  3. ctrl-click or ctrl-hover over e.g. a function call or variable.
  4. Clicking it often takes tens of seconds to perform, and hovering usually just shows "Loading...".

Expected behavior

Clicking always immediately goes to the definition, and hovering always brings up the information about the item.

Screenshots

Screenshot_20191002_090522

Additional context

cpp.log settings.log (Renamed to appease GitHub) /home is on NFS, but the projects and the intellisense cache path are on a local drive.

sean-mcmanus commented 5 years ago

Normally it might take a second or so. My guess is that hover documentation comment lookup is causing the slowdown. I think might need a repro for the "tens of second" case though...it sounds like there's something unusual going on in your project, unless you get the same behavior with a simple project.

LinAGKar commented 5 years ago

This seems to happen for all projects. Symlinking ~/.config/Code onto a local drive makes it way better, so it seems like there is an extreme performance penalty when the profile is on NFS.

sean-mcmanus commented 5 years ago

Yes, our database files get saved under the ~/.config directory by default so that if that is remote then it could slow down all database accesses. You could also try setting the browse.databaseFilename to a local path/file.