summaryrefslogtreecommitdiffstats
path: root/Doc
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 /Doc
parentcd449806fac1246cb7b4d392026fe6986ec01fb7 (diff)
downloadcpython-19c46a4c96553b2a8390bf8a0e138f2b23e28ed6.zip
cpython-19c46a4c96553b2a8390bf8a0e138f2b23e28ed6.tar.gz
cpython-19c46a4c96553b2a8390bf8a0e138f2b23e28ed6.tar.bz2
bpo-33695 shutil.copytree() + os.scandir() cache (#7874)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.8.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 91e0d5b..e5e6d4a5 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -277,6 +277,14 @@ Optimizations
See :ref:`shutil-platform-dependent-efficient-copy-operations` section.
(Contributed by Giampaolo Rodola' in :issue:`25427`.)
+* :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`.)
+
+
* The default protocol in the :mod:`pickle` module is now Protocol 4,
first introduced in Python 3.4. It offers better performance and smaller
size compared to Protocol 3 available since Python 3.0.