Significant Performance Regression in 1.1.405+
- Dominant language
- Python
- Stars
- 15.6k
- Forks
- 1.8k
- Avg merge
- 12h 13m
- Merged PRs (30d)
- 52
Description
**Describe the bug**
I'm seeing a reproducible significant (~20s -> ~9 minutes!) performance regression on our large codebase that I've narrowed down to beginning with 1.1.405. I have also tested 1.1.406 and 1.1.408 and can confirm it reproduces there.
Looking at the stats/verbose output, the only difference I can seem to find is that one particular file takes `524587ms` in 1.1.405+ up from `159ms` in `1.1.404`. When excluding that file, another (similar) file spikes in time taken for checking (`387ms` on the non-excluded run, `493372ms` on the excluded run).
**20 second run**
`uv run --with pyright==1.1.404 pyright --stats --verbose`
```
Completed in 21.828sec
Analysis stats
Total files parsed and bound: 4964
Total files checked: 1454
Timing stats
Find Source Files: 0.03sec
Read Source Files: 0.88sec
Tokenize: 0.94sec
Parse: 0.77sec
Resolve Imports: 1.2sec
Bind: 1.01sec
Check: 16.66sec
Detect Cycles: 0sec
```
**9 minute run**
`uv run --with pyright==1.1.405 pyright --stats --verbose`
```
Completed in 545.704sec
Analysis stats
Total files parsed and bound: 4965
Total files checked: 1454
Timing stats
Find Source Files: 0.03sec
Read Source Files: 0.86sec
Tokenize: 0.95sec
Parse: 0.71sec
Resolve Imports: 0.58sec
Bind: 0.98sec
Check: 541.27sec
Detect Cycles: 0sec
```
**Specs/Configuration**
Running using Python 31.4 on a M5 Mac with Node 24
Default configuration besides `pythonVersion = "3.14"` and a `includes` array.
I've omitted the full verbose logs, and haven't included the file, to avoid leaking any information about the codebase publicly but am happy to share full logs privately with contributors and I'm happy to experiment with that file to help identify what the time is being taken on.
Contributor guide
Research direction
Start by running the provided uv commands with pyright 1.1.404 and 1.1.405, comparing the --stats --verbose timing output. The issue does not name a public reproducer or source file, so request the offered private logs and problematic file before tracing the regression. Done means identifying the cause of the Check-time increase and restoring performance near the 1.1.404 baseline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100