[Python-Dev] Remaining decisions on PEP 471 -- os.scandir()
Antoine Pitrou
antoine at python.org
Mon Jul 21 01:45:28 CEST 2014
Le 20/07/2014 17:34, Ben Hoyt a écrit :
>> Have you tried modifying importlib's _bootstrap.py to use scandir() instead
>> of listdir() + stat()?
>
> No, I haven't -- I'm not familiar with that code. What does
> _bootstrap.py do -- does it do a lot of listdir calls and stat-ing of
> many files?
Quite a bit, although that should be dampened in recent 3.x versions,
thanks to the caching of directory contents.
Even though there is tangible performance improvement from scandir(), it
would be useful to find out if the API fits well.
Regards
Antoine.
More information about the Python-Dev
mailing list