[issue11583] os.path.isdir() is slow on windows

2011-06-09 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset d40609dd01e0 by Brian Curtin in branch '3.2': Correction to 88e318166eaf - Issue #11583 http://hg.python.org/cpython/rev/d40609dd01e0 New changeset fe813f5711a5 by Brian Curtin in branch '2.7': Correction to f1509fc75435 - Issue

[issue11583] os.path.isdir() is slow on windows

2011-06-08 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 88e318166eaf by Brian Curtin in branch '3.2': Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat. http://hg.python.org/cpython/rev/88e318166eaf New changeset 567f30527913 by Brian Curtin in branch

[issue11583] os.path.isdir() is slow on windows

2011-06-08 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: This was also pushed to 2.7 in f1509fc75435. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue11583] os.path.isdir() is slow on windows

2011-06-08 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Brian - great, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583 ___ ___

[issue11583] os.path.isdir() is slow on windows

2011-06-04 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Code looks good and tests pass. Only one thing: the code in the patched lib\ntpath.py still refers to FindFirstFile -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583

[issue11583] os.path.isdir() is slow on windows

2011-06-03 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Attached is a patch that makes this about twice as fast for regular files and about 15 times faster for symbolic links and directories. Not that this would be anyone's performance bottleneck, but it does make the time more of a constant due to

[issue11583] os.path.isdir() is slow on windows

2011-06-03 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Looks like I didn't test this enough - many other test failures are occurring. Disregard this patch for now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583

[issue11583] os.path.isdir() is slow on windows

2011-06-03 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: One (presumably unintended) side-effect is that you can now do os.path.isdir on a wildcard and the first returned entry will be tested for directoryness: import os os.path.isdir (c:/tem*) # = True where c:/temp exists --

[issue11583] os.path.isdir() is slow on windows

2011-06-03 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Here's a patch that works. All tests are passing. I changed from using FindFirstFile to GetFileAttributes, which provides basically the same performance characteristics. One change in this implementation is to not raise a WindowsError when the

[issue11583] os.path.isdir() is slow on windows

2011-03-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583 ___ ___

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Eli Bendersky
New submission from Eli Bendersky eli...@gmail.com: Report here: http://stackoverflow.com/questions/5316928/python-os-path-isdir-is-slow-on-windows It could be a problem with Windows itself, but I'm opening this to keep track of the issue, just to be on the safe side. -- components:

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: How do you expect this to be resolved? Or will it stay open until Microsoft improves the NTFS performance? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: On Thu, Mar 17, 2011 at 12:46, Martin v. Löwis rep...@bugs.python.orgwrote: I opened this in order not to forget to look at the implementation of isdir on windows, making sure it's the most optimal thing we can do. If you know it is, the issue

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file21266/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583 ___

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Ok. It's probably not the most optimal thing we can do. It opens the directory with CreateFileW (specifying OPEN_EXISTING and BACKUP_SEMANTICS), then GetFileInformationByHandle. If we only want to find out whether the file is a directory,

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: I made a bunch of the stat changes in 3.2 so I'll assign this to myself and take a look. -- assignee: - brian.curtin stage: - needs patch ___ Python tracker rep...@bugs.python.org

[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Daniel Stutzbach
Changes by Daniel Stutzbach stutzb...@google.com: -- nosy: +stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11583 ___ ___ Python-bugs-list