[New-bugs-announce] [issue19240] iglob should try to use `readdir`

Miki Tebeka report at bugs.python.org
Sun Oct 13 03:42:58 CEST 2013


New submission from Miki Tebeka:

Currently glob.iglob calls os.listdir internally. Which means that if there are many files in the directory - a big list of them is created in memory.

iglob should try to use readdir and be a "true" iterator, not consuming a lot of memory.

See one possible implementation using ctypes at http://stackoverflow.com/questions/4403598/list-files-in-a-folder-as-a-stream-to-begin-process-immediately

----------
components: Library (Lib)
messages: 199649
nosy: tebeka
priority: normal
severity: normal
status: open
title: iglob should try to use `readdir`
type: performance
versions: Python 3.4

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


More information about the New-bugs-announce mailing list