[New-bugs-announce] [issue23628] See if os.scandir() could help speed up importlib
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().
components: Interpreter Core
stage: needs patch
title: See if os.scandir() could help speed up importlib
versions: Python 3.5
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce