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.

Author enkore
Recipients enkore, josh.r, serhiy.storchaka, xiang.zhang
Date 2016-10-31.17:40:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The main issue on *nix is more likely that by using listdir you get directory order, while what you really need is inode ordering. scandir allows for that, since you get the inode from the DirEntry with no extra syscalls - especially without an open() or stat().

Other optimizations are also possible. For example opening the directory and using unlinkat() would likely shave off a bit of CPU. But the dominating factor here is likely the bad access pattern.
Date User Action Args
2016-10-31 17:40:23enkoresetrecipients: + enkore, serhiy.storchaka, josh.r, xiang.zhang
2016-10-31 17:40:23enkoresetmessageid: <>
2016-10-31 17:40:23enkorelinkissue28564 messages
2016-10-31 17:40:22enkorecreate