This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年10月13日 01:42 by tebeka, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg199649 - (view) | Author: Miki Tebeka (tebeka) * | Date: 2013年10月13日 01:42 | |
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 |
|||
| msg199657 - (view) | Author: Charles-François Natali (neologix) * (Python committer) | Date: 2013年10月13日 06:47 | |
Actually, it should probably be using a generator-based version of os.listdir(). See #11406. |
|||
| msg287251 - (view) | Author: Ben Longbons (o11c) * | Date: 2017年02月07日 18:46 | |
This is a duplicate of bug 25596, which is now fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:51 | admin | set | github: 63439 |
| 2017年02月07日 19:05:40 | serhiy.storchaka | set | status: open -> closed superseder: Use scandir() to speed up the glob module resolution: duplicate stage: resolved |
| 2017年02月07日 18:46:38 | o11c | set | nosy:
+ o11c messages: + msg287251 |
| 2013年10月13日 06:47:06 | neologix | set | nosy:
+ neologix dependencies: + There is no os.listdir() equivalent returning generator instead of list messages: + msg199657 |
| 2013年10月13日 01:42:57 | tebeka | create | |