vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

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

Open LinAGKar opened this issue 6 years ago • 3 comments

Type: LanguageService

Describe the bug

  • OS and Version: OpenSUSE Leap 15.1
  • VS Code Version: 1.38.1
  • C/C++ Extension Version: 0.25.1
  • Other extensions you installed (and if the issue persists after disabling them):
    • Bookmarks
    • CMake
    • Debugger for Chrome
    • Git History
    • GitLens
    • Language-Cython
    • Markdown Preview Enhanced
    • markdownlint
    • Python
    • TSLint
    • XML Tools
    • I've disabled all these extensions and still get the same behavior.
  • A clear and concise description of what the bug is.
    • Features like go to declaration and hover over items are extremely unresponsive. Go to declaration usually takes tens of seconds to perform, and when you hover over something the pop-up usually just says "Loading...". Same thing happens with the GitLens pop-ups when I have that installed, but only for C/C++ files. This seems to happen regardless of what folder I open, for example, the attached log is for wireless_tools.

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.

LinAGKar avatar Oct 02 '19 07:10 LinAGKar

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.

sean-mcmanus avatar Oct 03 '19 18:10 sean-mcmanus

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.

LinAGKar avatar Oct 04 '19 06:10 LinAGKar

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.

sean-mcmanus avatar Oct 04 '19 20:10 sean-mcmanus