summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2018-11-12 14:18:15 (GMT)
committerGitHub <noreply@github.com>2018-11-12 14:18:15 (GMT)
commit19c46a4c96553b2a8390bf8a0e138f2b23e28ed6 (patch)
treef8c59fab93db82769dc938e1c5f28961c165292c /Misc
parentcd449806fac1246cb7b4d392026fe6986ec01fb7 (diff)
downloadcpython-19c46a4c96553b2a8390bf8a0e138f2b23e28ed6.zip
cpython-19c46a4c96553b2a8390bf8a0e138f2b23e28ed6.tar.gz
cpython-19c46a4c96553b2a8390bf8a0e138f2b23e28ed6.tar.bz2
bpo-33695 shutil.copytree() + os.scandir() cache (#7874)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-06-23-12-47-37.bpo-33695.seRTxh.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-06-23-12-47-37.bpo-33695.seRTxh.rst b/Misc/NEWS.d/next/Library/2018-06-23-12-47-37.bpo-33695.seRTxh.rst
new file mode 100644
index 0000000..2195045
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-06-23-12-47-37.bpo-33695.seRTxh.rst
@@ -0,0 +1,7 @@
+:func:`shutil.copytree` uses :func:`os.scandir` function and all copy
+functions depending from it use cached :func:`os.stat` values. The speedup
+for copying a directory with 8000 files is around +9% on Linux, +20% on
+Windows and + 30% on a Windows SMB share. Also the number of :func:`os.stat`
+syscalls is reduced by 38% making :func:`shutil.copytree` especially faster
+on network filesystems.
+(Contributed by Giampaolo Rodola' in :issue:`33695`.)