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 <rep...@bugs.python.org> <http://bugs.python.org/issue19240> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com