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 <1533181966.95.0.56676864532.issue33695@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
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: <1533181966.95.0.56676864532.issue33695@psf.upfronthosting.co.za>
2018-08-02 03:52:46serhiy.storchakalinkissue33695 messages
2018-08-02 03:52:46serhiy.storchakacreate