Message196473
| Author |
brett.cannon |
| Recipients |
brett.cannon, eric.snow |
| Date |
2013年08月29日.17:58:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1377799087.61.0.682390742234.issue18810@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I also just tried using os.listdir() for a package before searching for __init__ and it didn't speed anything up either (actually timeit suggests that os.listdir() is worse than an isdir + 3 * isfile checks). Nor did caching directory stuff at the class level so that they were shared when an os.listdir() was done for an __init__ so that didn't have to be done a second time if the cache wasn't stale already.
I have attached the patch with all of the changes to cut the number of stat calls down significantly, but benchmarking on my work machine shows no definitive benefit. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年08月29日 17:58:07 | brett.cannon | set | recipients:
+ brett.cannon, eric.snow |
| 2013年08月29日 17:58:07 | brett.cannon | set | messageid: <1377799087.61.0.682390742234.issue18810@psf.upfronthosting.co.za> |
| 2013年08月29日 17:58:07 | brett.cannon | link | issue18810 messages |
| 2013年08月29日 17:58:07 | brett.cannon | create |
|