workspace symbol caching
original issue: https://github.com/microsoft/pyright/issues/1997
Is your feature request related to a problem? Please describe.
I work on a large project (Apache Airflow) and using the "workspace" symbols is so slow as to be unusable -- 72 seconds and 65s in two consecutive tests I just performed.
The issue is that this time happens every time a symbol is searched for, making it essentially unusable in this workflow
Describe the solution you'd like I'd like some kind of caching, so that I only have to pay this time cost (the first time per session) I assume it is parsing the entire workspace and and any files
Additional context
My (local, uncommitted) pyrightconfig.json file contains:
{ "exclude": [ "build/lib", "provider_packages/airflow", "provider_packages/build", ".eggs*", "build-*/**", "**/node_modules", "**/__pycache__", ], "reportUnusedImport": true, "reportDuplicateImport": true, "reportUnusedVariable": true, "reportUnknownParameterType": false, "reportUnboundVariable": true, "reportUnnecessaryIsInstance": true, "reportUnnecessaryCast": true, "venv": "airflow" }Codium (linux) extension (not vim/nvim this time) details:
Name: Pyright Id: ms-pyright.pyright Description: VS Code static type checking for Python Version: 1.1.150 Publisher: ms-pyright
seo: indexing
Tangential to the issue topic, but as a first step maybe you can add a way of enabling listing all symbols? Ie.: removing this hardcoded condition: https://github.com/DetachHead/basedpyright/blob/0618b0988d6733f758bef6c0812780efd7e77bbe/packages/pyright-internal/src/languageService/workspaceSymbolProvider.ts#L134
Tangential to the issue topic, but as a first step maybe you can add a way of enabling listing all symbols? Ie.: removing this hardcoded condition:
basedpyright/packages/pyright-internal/src/languageService/workspaceSymbolProvider.ts
Line 134 in 0618b09
if (!this._query) {
would this not slow everything down a lot?