[New-bugs-announce] [issue23628] See if os.scandir() could help speed up importlib

Brett Cannon report at bugs.python.org
Tue Mar 10 15:41:42 CET 2015


New submission from Brett Cannon:

With os.scandir() now committed and implemented in C, it would be interesting to see if os.scandir() could provide any performance benefit to importlib. If finders can pass the DirEntry to loaders then some stat calls could potentially be saved at the expense of stale file metadata.

Even if the performance is flat and the sharing of cached information is deemed not worth it, os.scandir() might still be beneficial by ditching some custom code in importlib that exists purely to replicate Python code from os.py, like _path_isfile().

----------
assignee: brett.cannon
components: Interpreter Core
messages: 237771
nosy: brett.cannon
priority: low
severity: normal
stage: needs patch
status: open
title: See if os.scandir() could help speed up importlib
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23628>
_______________________________________


More information about the New-bugs-announce mailing list