DetachHead / basedpyright

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server
http://docs.basedpyright.com/
Other
601 stars 12 forks source link

workspace symbol caching #427

Open DetachHead opened 2 weeks ago

DetachHead commented 2 weeks ago

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