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

2011-06-09 Thread Roundup Robot
Roundup Robot 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 #11583 http://hg.py

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

2011-06-08 Thread Eli Bendersky
Eli Bendersky added the comment: Brian - great, thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

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

2011-06-08 Thread Brian Curtin
Brian Curtin 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

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

2011-06-08 Thread Roundup Robot
Roundup Robot 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 'default': Fix #11583. C

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

2011-06-04 Thread Tim Golden
Tim Golden 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 ___

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

2011-06-03 Thread Brian Curtin
Brian Curtin 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 file cannot be o

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

2011-06-03 Thread Tim Golden
Tim Golden 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 added the comment: Looks like I didn't test this enough - many other test failures are occurring. Disregard this patch for now. -- ___ Python tracker ___ _

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

2011-06-03 Thread Brian Curtin
Brian Curtin 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 the recursion and

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

2011-03-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2011-03-17 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

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

2011-03-17 Thread Brian Curtin
Brian Curtin 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 ___

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

2011-03-17 Thread Martin v . Löwis
Martin v. Löwis 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, we could just to Fi

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

2011-03-17 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file21266/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

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

2011-03-17 Thread Eli Bendersky
Eli Bendersky added the comment: On Thu, Mar 17, 2011 at 12:46, Martin v. Löwis wrote: 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 can be closed as far as I'm concerned.

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

2011-03-17 Thread Martin v . Löwis
Martin v. Löwis 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 __

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

2011-03-17 Thread Eli Bendersky
New submission from Eli Bendersky : 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: Library (Lib) mes