Commit e43e045
authored
Cache _has_init calls to avoid repeated stats (#2429)
_has_init can end up checking for the presence of the same files
over and over.
For example, when running pylint's import-error checks on a
codebase like yt-dlp, ~43,000 redundant stats were performed prior
to caching.
Closes pylint-dev/pylint#9613.1 parent 16da308 commit e43e045
2 files changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
| 473 | + | |
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| 673 | + | |
673 | 674 | | |
674 | 675 | | |
675 | 676 | | |
| |||
0 commit comments