vscode: quick open takes 30-40 seconds (to get files that don't appear in "recently opened")

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.69.2 (user setup)
  • Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a
  • Date: 2022-07-18T16:12:52.460Z
  • Electron: 18.3.5
  • Chromium: 100.0.4896.160
  • Node.js: 16.13.2
  • V8: 10.0.139.17-electron.0
  • OS Version: Windows_NT x64 10.0.22000

PC configuration

  • RAM : 12 GB
  • Processor: Intel Core i7 (10 Gen)

Steps to Reproduce: There are no specific steps to reproduce the issue but here is some situation when I faced this issue.

  1. Create new files via CLI commands frameworks AdonisJS OR Laravel. And then ctrl+p type the newly created file name.
  2. Keep typing for approx. 5 minutes and then create new files via the command line and try to open that file or other file from the framework.

After typing files name it takes approx. 30-40 sec. to list the file.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 47 (19 by maintainers)

Most upvoted comments

I’m seeing the same behavior. In a small repository, it’s very fast. But in my larger workspaces / repositories, it’s very slow.

I get sub-second results in this repo (on a MacBook Pro)

> find . | wc -l
    1789

And very slow first results (30-60seconds?) in this one, but only a couple seconds afterwards (also on the MacBook Pro)

> find . | wc -l 
  945212

And then on a vs-code remote linux workstation, it seems to never complete (I’m not patient to wait minutes):

> find . | wc -l
2567950

(yes, 2.6 million files)

Using rg, and some of my search excludes (it looks like any pattern that’s fully excluded is passed to rg to trim down results:

rg --files --hidden --case-sensitive --no-follow --no-ignore --no-config --no-ignore-global -g '!.jiri_root/**' -g '!**/.cipd' -g '!**/.git' | wc -l
1977606

which runs in 3.3-3.4sec. (and still is ~2M files)

If I remove my output directory’s generated-sources directories from the search includes (so vscode can have rg remove out/** as well):

    "search.exclude": {
      ".jiri_root/goma_cache": true,
      ".jiri_root/update_history*": true,
      "out/**": true,
      // "out/*/gen/**": false,
      // "out/*/*/gen/**": false,
    },

I get :

rg --files --hidden --case-sensitive --no-follow --no-ignore --no-config --no-ignore-global -g '!.jiri_root/**' -g '!**/.cipd' -g '!**/.git' -g '!out/**' | wc -l
313727

which runs in about 0.5seconds, and then quick-open is functional, albeit still taking 25-30 seconds to produce a list of files.

Based on this, I think that the issue seems like it’s in the vscode code that takes the results from rg and pares them down by matching against them.

I think this is reproducible on any sufficiently-large and complicated workspace (I can give you setup instructions for mine, which is open-source).