Repository: vscode
Issue: "Go to file" time-to-first-result is pathological (~15s) when quickOpen.includeSymbols enabled
Labels: feature-request,workspace-symbols,quick-open

Type: <b>Performance Issue</b>

I spent my day tracking down the following _absurd_ slowness in my VScode's "Go to file" (⌃P):

https://imgur.com/M3QjVI3

I was finally able to track it down (ocamllabs/vscode-ocaml-platform#1156) to this setting, plus an LSP analyzing a large project:

```json
"search.quickOpen.includeSymbols": true
```

----

I have a high-priority (hopefully) fix to request, and a further suggestion to improve this experience:

1. The filesystem search should _absolutely_ continue to happen in parallel, and results from that search should immediately be displayed when available, without waiting on an LSP's `workspace/symbol` request;

2. If the LSP takes more than some friendly amount of time to respond (i.e. if the filesystem results have appeared, but the progress-bar is still proceeding for >7 seconds or something), some sort of informational feedback should be provided to the user:

   > "OCaml Platform" is taking a while to produce symbol results; consider disabling `search.quickOpen.includeSymbols` for this project

VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:58:33.551Z)
OS version: Darwin arm64 22.3.0
Modes:
Connection to 'ssh-remote+nspawn' could not be established
Connection to 'SSH: nspawn' could not be established  Canceled
Remote OS version: Linux x64 5.16.0-0.bpo.4-amd64
Remote OS version: Linux x64 5.16.0-0.bpo.4-amd64

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Apple M1 Pro (10 x 24)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|16, 13, 14|
|Memory (System)|16.00GB (0.06GB free)|
|Process Argv|--crash-reporter-id ddb5da65-4654-412e-9dc3-738998ade011|
|Screen Reader|no|
|VM|0%|

Connection to 'ssh-remote+nspawn' could not be established

Connection to 'SSH: nspawn' could not be established  Canceled

|Item|Value|
|---|---|
|Remote|SSH: nspawn|
|OS|Linux x64 5.16.0-0.bpo.4-amd64|
|CPUs|AMD EPYC 9554 64-Core Processor (256 x 3750)|
|Memory (System)|1510.76GB (1270.40GB free)|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: nspawn|
|OS|Linux x64 5.16.0-0.bpo.4-amd64|
|CPUs|AMD EPYC 9554 64-Core Processor (256 x 3749)|
|Memory (System)|1510.76GB (1270.40GB free)|
|VM|0%|
</details><details>
<summary>Process Info</summary>

```
CPU %	Mem MB	   PID	Process
    2	   180	   772	code main
    1	    66	   843	   gpu-process
    0	    16	   846	   utility-network-service
    0	    66	   852	window [2] (README.markdown — ppx_trace (Workspace) — Work)
    0	    82	   853	window [3] (extension.ml (b4fc58c) ↔ extension.ml (8b1e1a7) — ppxlib (Workspace) — Work)
    0	    66	   854	window [4] (default-npm-packages — System)
    0	   164	   855	window [5] (hosts.yaml — Infrastructure)
    0	    49	   856	window [6] ({{FrontSide}} • Untitled-4)
    0	    16	  1116	ptyHost
    0	     0	  1305	     /opt/homebrew/bin/zsh -il
    0	     0	  2954	       /opt/homebrew/bin/zsh -il
    0	     0	  3977	     /opt/homebrew/bin/zsh -il
    0	     0	 44818	     /opt/homebrew/bin/zsh -il
    0	    66	  1143	shared-process
    0	     0	 72959	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	    16	  1144	fileWatcher [4]
    0	    16	  1199	fileWatcher [6]
    0	    33	  1295	extensionHost [4]
    0	     0	  1399	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/htmlhint.vscode-htmlhint-1.0.5/node_modules/vscode-languageclient/lib/utils/electronForkStart /Users/ec/.vscode/extensions/htmlhint.vscode-htmlhint-1.0.5/server/server.js --node-ipc --clientProcessId=1295)
    0	     0	  1429	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/znck.grammarly-0.22.1/dist/server/index.node.js --node-ipc --clientProcessId=1295)
    0	    16	  2960	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=1295)
    0	     0	  4478	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/streetsidesoftware.code-spell-checker-2.20.5/packages/_server/dist/main.js --node-ipc --clientProcessId=1295)
    0	     0	  5775	     /Users/ec/.vscode/extensions/stateful.runme-1.5.3-darwin-arm64/bin/runme server --address localhost:7865 --runner --tls /var/folders/1w/j9jrt4m53r95_l_k33f7qbl40000gn/T/runme/fb3835ce-3659-43f8-90c4-2a26cab69149/tls
    0	    16	  5825	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/redhat.vscode-yaml-1.13.0/dist/languageserver.js --node-ipc --clientProcessId=1295)
    0	     0	  5859	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/redhat.ansible-2.4.78/out/server/src/server.js --node-ipc --clientProcessId=1295)
    0	    16	 81741	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/ms-python.vscode-pylance-2023.6.30/dist/server.bundle.js --cancellationReceive=file:7bac15947c03d5576e54aa2788164947d864185823 --node-ipc --clientProcessId=1295)
    0	    16	  1296	extensionHost [6]
    0	    16	  1453	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/htmlhint.vscode-htmlhint-1.0.5/node_modules/vscode-languageclient/lib/utils/electronForkStart /Users/ec/.vscode/extensions/htmlhint.vscode-htmlhint-1.0.5/server/server.js --node-ipc --clientProcessId=1296)
    0	     0	  1457	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/znck.grammarly-0.22.1/dist/server/index.node.js --node-ipc --clientProcessId=1296)
    0	     0	  1468	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/html-language-features/server/dist/node/htmlServerMain --node-ipc --clientProcessId=1296)
    0	     0	  1471	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/mkaufman.htmlhint-0.10.0/node_modules/vscode-languageclient/lib/utils/electronForkStart /Users/ec/.vscode/extensions/mkaufman.htmlhint-0.10.0/server/server.js --node-ipc --clientProcessId=1296)
    0	     0	  2821	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=1296)
    0	     0	  3993	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/streetsidesoftware.code-spell-checker-2.20.5/packages/_server/dist/main.js --node-ipc --clientProcessId=1296)
    0	     0	  4009	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/dbaeumer.vscode-eslint-2.4.0/server/out/eslintServer.js --node-ipc --clientProcessId=1296)
    0	     0	  5264	     /Users/ec/.vscode/extensions/stateful.runme-1.5.3-darwin-arm64/bin/runme server --address localhost:7864 --runner --tls /var/folders/1w/j9jrt4m53r95_l_k33f7qbl40000gn/T/runme/f3837db6-937f-4f2e-812c-c124b0c99582/tls
    0	    33	 42196	extensionHost [3]
    0	    16	 42233	fileWatcher [3]
    0	    16	 43203	fileWatcher [5]
    0	    33	 43204	extensionHost [5]
    0	    16	 43395	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/htmlhint.vscode-htmlhint-1.0.5/node_modules/vscode-languageclient/lib/utils/electronForkStart /Users/ec/.vscode/extensions/htmlhint.vscode-htmlhint-1.0.5/server/server.js --node-ipc --clientProcessId=43204)
    0	     0	 43565	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/znck.grammarly-0.22.1/dist/server/index.node.js --node-ipc --clientProcessId=43204)
    0	    16	 43689	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/redhat.vscode-yaml-1.13.0/dist/languageserver.js --node-ipc --clientProcessId=43204)
    0	     0	 44202	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/redhat.ansible-2.4.78/out/server/src/server.js --node-ipc --clientProcessId=43204)
    0	     0	 44282	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=43204)
    0	    16	 44583	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/streetsidesoftware.code-spell-checker-2.20.5/packages/_server/dist/main.js --node-ipc --clientProcessId=43204)
    0	    16	 44584	     electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/ec/.vscode/extensions/ms-python.vscode-pylance-2023.6.30/dist/server.bundle.js --cancellationReceive=file:6eb527195d78f9c4895b1cf9b5523ab320bd8ec75d --node-ipc --clientProcessId=43204)
    0	     0	 44613	     /Users/ec/.vscode/extensions/stateful.runme-1.6.1-darwin-arm64/bin/runme server --address localhost:7863 --runner --tls /var/folders/1w/j9jrt4m53r95_l_k33f7qbl40000gn/T/runme/b6bdacb4-ac53-4c46-8fe1-fc3b1aaaef78/tls
    0	    16	 45746	extensionHost [2]
    0	    16	 45935	fileWatcher [2]
    0	    33	 45944	   window
    0	    98	 53673	window [8] (api.ml — BE (Workspace) — Work)
    0	   197	 63610	window [9] (monorepo [SSH: nspawn] — Temp 1)
    0	    66	 72048	extensionHost [8]
    0	    33	 72056	fileWatcher [8]
    0	    33	 72873	fileWatcher [9]
    0	    49	 72874	extensionHost [9]
    0	    98	 72949	window [13] (Issue Reporter)
Connection to 'ssh-remote+nspawn' could not be established
Connection to 'SSH: nspawn' could not be established  Canceled

Remote: SSH: nspawn

Remote: SSH: nspawn
```

</details>
<details>
<summary>Workspace Info</summary>

```
|  Window (hosts.yaml — Infrastructure)
|  Window (default-npm-packages — System)
|    Folder (Infrastructure): 20 files
|      File types: yaml(7) json(2) sql(2) cfg(1) jsonc(1) mjs(1)
|      Conf files: settings.json(1)
|    Folder (System): more than 22603 files
|      File types: code(7534) json(59) dmp(18) sh(6) old(6) txt(5)
|                  gitignore(4) 0(4) 2(4) cache(4)
|      Conf files: settings.json(1) makefile(1) package.json(1)
Connection to 'ssh-remote+nspawn' could not be established
Connection to 'SSH: nspawn' could not be established  Canceled;
```

</details>
<details><summary>Extensions (2)</summary>

Extension|Author (truncated)|Version
---|---|---
remote-ssh|ms-|0.102.0
ocaml-platform|oca|1.12.2


</details>
<!-- generated by issue reporter -->