summaryrefslogtreecommitdiff
path: root/Misc/NEWS
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-06-08 18:43:57 -0500
committerBrian Curtin <brian@python.org>2011-06-08 18:43:57 -0500
commit9a82eaade3cbfba9895b6121daf8ddb65b5aaa4d (patch)
tree8257efd366978aee3774e35858f00e62b6b1a089 /Misc/NEWS
parent4dd453c6aab315954f19bf0b2f1541c2b37d8e34 (diff)
parent9c669ccc77c85eac245d460bab510a38b20d9a08 (diff)
downloadcpython-git-9a82eaade3cbfba9895b6121daf8ddb65b5aaa4d.tar.gz
Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure out if the path is a directory without opening the file via os.stat. This has the minor benefit of speeding up os.path.isdir by at least 2x for regular files and 10-15x improvements were seen on symbolic links (which opened the file multiple times during os.stat). Since os.path.isdir is used in several places on interpreter startup, we get a minor speedup in startup time.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r--Misc/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 1995b14158..6f10ba6d3a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -187,6 +187,9 @@ Core and Builtins
Library
-------
+- Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes
+ instead of os.stat.
+
- Issue #12021: Make mmap's read() method argument optional. Patch by Petri
Lehtinen.