Message196473
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. |
|
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 | |
|