[Python-Dev] file system path protocol PEP
Serhiy Storchaka
storchaka at gmail.com
Thu May 12 00:32:21 EDT 2016
On 11.05.16 23:51, Ethan Furman wrote:
> On 05/11/2016 01:44 PM, Serhiy Storchaka wrote:
>> I afraid that this will hit a performance. Some os.path functions are
>> used in tight loops, they are hard optimized, and adding support of path
>> protocol can have visible negative effect.
>
> Do you have an example of os.path functions being used in a tight loop?
posixpath.realpath(), os.walk(), glob.glob() calls split() and join()
for every path component. dirname() and basename() are also often
called. I doesn't count functions like islink() and isfile() since they
just pass the argument to underlying stat function and don't need
conversion.
More information about the Python-Dev
mailing list