Commit 715b768
Filter to possible package paths before trying to resolve a module (#18038)
With a long sys.path (it's got 300 entries), this removes 94% of stat
syscalls from running mypy. With all the filesystem caching, that's only
a small time savings, though it will depend on your filesystem. Local
benchmarks showed a 20% time savings but they're pretty noisy from all
the I/O.
---------
Co-authored-by: Daniel Jacobowitz <dmj@openai.com>
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>1 parent 9365fbf commit 715b768
File tree
3 files changed
+19
-11
lines changed- mypy
- test
- test-data/unit
3 files changed
+19
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
336 | 334 | | |
337 | 335 | | |
338 | 336 | | |
| |||
414 | 412 | | |
415 | 413 | | |
416 | 414 | | |
417 | | - | |
418 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
419 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
420 | 425 | | |
421 | 426 | | |
422 | 427 | | |
| |||
445 | 450 | | |
446 | 451 | | |
447 | 452 | | |
448 | | - | |
449 | | - | |
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| 456 | + | |
453 | 457 | | |
454 | 458 | | |
455 | 459 | | |
| |||
548 | 552 | | |
549 | 553 | | |
550 | 554 | | |
551 | | - | |
| 555 | + | |
552 | 556 | | |
553 | | - | |
| 557 | + | |
554 | 558 | | |
555 | | - | |
556 | | - | |
| 559 | + | |
557 | 560 | | |
558 | 561 | | |
559 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3146 | 3146 | | |
3147 | 3147 | | |
3148 | 3148 | | |
3149 | | - | |
| 3149 | + | |
3150 | 3150 | | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
3151 | 3156 | | |
3152 | 3157 | | |
3153 | 3158 | | |
| |||
0 commit comments