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 serhiy.storchaka
Recipients benhoyt, benjamin.peterson, brett.cannon, giampaolo.rodola, ncoghlan, serhiy.storchaka, stutzbach, tarek, vstinner, yselivanov
Date 2018-08-02.03:52:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
os.walk() and glob.glob() used *only* stat(), opendir() and readdir() syscalls (and stat() syscalls dominated). The effect of reducing the number of the stat() syscalls is significant. shutil.rmtree() uses also the unlink() syscall. Since it is usually cheap (but see issue32453), the benefit still is good, but not such large. Actually I had concerns about using scandir() in shutil.rmtree().

shutil.copytree() needs to open, read, and write files. This is not so cheap, and the benefit of reducing the number of the stat() syscalls is hardly noticed in real cases. shutil.copytree() was not converted to using scandir() intentionally.
Date User Action Args
2018-08-02 03:52:47serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, vstinner, giampaolo.rodola, benjamin.peterson, tarek, stutzbach, benhoyt, yselivanov
2018-08-02 03:52:46serhiy.storchakasetmessageid: <>
2018-08-02 03:52:46serhiy.storchakalinkissue33695 messages
2018-08-02 03:52:46serhiy.storchakacreate