Skip to content

Slow "Getting code actions from ..." revisited #21485

@janosh

Description

@janosh

Follow up to #19808 (which I can't comment on since locked).

I see the popup "Getting code actions from 'Python','Jupyter', 'Ruff'" all the time in large code bases, leading me to believe the slowness has something to do with scanning large numbers of files. The project I notice it most in has 527 Python files. It can take anywhere from 10 to 30+ seconds to save a file.

Screenshot 2023-06-24 at 6 10 24 PM

I tried disabling jupyter and black formatting and the issue persists. I was seeing it long before I started using ruff so prob not the culprit.

The Python extension logs look like mypy is running on every save. Maybe that explains the slowness? mypy scales poorly with project size in my experience.

2023-06-24 18:16:49.218 [info] > ~/.venv/py311/bin/python ~/.vscode/extensions/ms-python.python-2023.10.1/pythonFiles/linter.py -m mypy --follow-imports=silent --ignore-missing-imports --show-column-numbers --no-pretty ./pymatgen/core/tests/test_structure.py
2023-06-24 18:16:49.219 [info] cwd: .
2023-06-24 18:16:49.442 [info] ##########Linting Output - mypy##########

2023-06-24 18:16:49.442 [info] Success: no issues found in 1 source file

2023-06-24 18:16:49.554 [info] Discover tests for workspace name: pmg - uri: /Users/janosh/dev/pmg/pymatgen/core/tests/test_structure.py
2023-06-24 18:16:49.557 [info] > ~/.venv/py311/bin/python ~/.vscode/extensions/ms-python.python-2023.10.1/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear .
2023-06-24 18:16:49.557 [info] cwd: .


Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions