Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aditya-qure opened this issue Sep 9, 2024 · 2 comments
Closed

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

aditya-qure opened this issue Sep 9, 2024 · 2 comments
Assignees
Labels
needs repro Issue has not been reproduced yet waiting for user response Requires more information from user

Comments

@aditya-qure
Copy link

aditya-qure commented Sep 9, 2024

Environment data

  • Pylance version: v2024.8.2
  • OS and version: Ubuntu-22.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9, miniconda

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:
* You have opened your home directory or entire hard drive as a workspace
* Your workspace contains a very large number of directories and files
* Your workspace contains a symlink to a directory with many files
* Your workspace is remote, and file enumeration is slow
To reduce this time, open a workspace directory with fewer files or add a pyrightconfig.json configuration file with an "exclude" section to exclude subdirectories from your workspace. For more details, refer to https://github.com/microsoft/pyright/blob/main/docs/configuration.md.
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Sep 9, 2024
@heejaechang
Copy link
Contributor

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.

@debonte debonte added the waiting for user response Requires more information from user label Sep 9, 2024
Copy link
Contributor

This issue has been closed automatically because it needs more information and has not had recent activity. If the issue still persists, please reopen with the information requested. Thanks.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

3 participants