microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.7k stars 769 forks source link

Enumeration of workspace source files is taking a long time #6367

Open aditya-qure opened 1 week ago

aditya-qure commented 1 week ago

Environment data

Code Snippet

Repro Steps

  1. I am opening my monorepo. After a while, the intellisense stops working and basic feature stops working.
  2. I am using the following pyrightconfig.json
    
    {
    "exclude": [
      "**/traces",
      "**/traces_ts",
      "**/example_files**",
      "**/.pkl",
      "**/bazel-bin",
      "**/bazel",
      "apps/**",
      "**/resources/**",
      "**/tests/**",
      "**/node_modules",
      "**/.next",
      "**/__pycache__",
      "**/.coverage/**",
      "**/.git",
      "**/dist/**",
      "**/build/**",
      "**/.husky",
      "**/migrations",
    ],
    "ignore": [
      "**/node_modules",
      "**/__pycache__",
      "**/.*",
      "**/dist",
      "**/.vscode",
      "**/*.pyi",
      "**/__init__.py"
    ],
    }

## Expected behavior

## Actual behavior

## Logs

2024-09-09 16:56:29.809 [info] (47619) Searching for source files 2024-09-09 16:56:39.016 [info] [Error - 16:56:39] (47619) Enumeration of workspace source files is taking longer than 10 seconds. This may be because:

Adding this will cause a large amount of info to be printed to the Python output panel. This should not be left long term, as the performance impact of the logging is significant. -->

heejaechang commented 1 week ago

this wiki could help you on how to set large workspace - https://github.com/microsoft/pylance-release/wiki/Opening-Large-Workspaces-in-VS-Code

since you use pyrightconfig.json file, some of settings probably need to go to pyrightconfig.json rather than settings.json file.