New submission from Dave Jones: import subprocess hangs for ~25 seconds, 700+ files in dir - py 2.7.3, & 2.6.6
I'm running this test from a LiveCD to make sure the environment is relatively clean. ------------------ localhost Desktop # python --version Python 2.7.3 ------------------- <<<works fine here>>> localhost Desktop # cat sp.py #!/usr/bin/python import subprocess print "Done......." ------------------- localhost Desktop # ls -1 | wc -l 7 ------------------- localhost Desktop # time python sp.py Done....... real 0m0.027s user 0m0.023s sys 0m0.003s --- BUT--- <<< This cannot be right>>> localhost Desktop # mv sp.py .. mv: overwrite `../sp.py'? y localhost Desktop # cd .. localhost jonesda0 # cat sp.py #!/usr/bin/python import subprocess print "Done......." localhost jonesda0 # time python sp.py 100000000 Done....... real 0m25.336s user 0m25.270s sys 0m0.014s localhost jonesda0 # ls -1 | wc -l 758 Only change is the number of files in the directory. I have tested this on several different LiveCDs but the results are the same. Is there some sort of flag I need to know about? FWIW, I do not see the problem when using python3.. localhost jonesda0 # yum -y install python3 Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit ... Installed: python3.i686 0:3.1.2-14.fc14 Dependency Installed: python3-libs.i686 0:3.1.2-14.fc14 Complete! localhost jonesda0 # time python3 sp.py ## (print function...duh) File "sp.py", line 5 print "Done......." ^ SyntaxError: invalid syntax real 0m0.048s user 0m0.044s sys 0m0.004s localhost jonesda0 # vi sp.py localhost jonesda0 # time python3 sp.py Done....... real 0m0.091s user 0m0.084s sys 0m0.006s localhost jonesda0 # python3 --version Python 3.1.2 ---------- messages: 181348 nosy: Dave.Jones priority: normal severity: normal status: open title: import subprocess hangs for ~25 seconds, 700+ files in dir - py 2.7.3, & 2.6.6 versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com