Message181348
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 |
|
Date |
User |
Action |
Args |
2013-02-04 16:50:54 | Dave.Jones | set | recipients:
+ Dave.Jones |
2013-02-04 16:50:54 | Dave.Jones | set | messageid: <1359996654.02.0.220330260052.issue17124@psf.upfronthosting.co.za> |
2013-02-04 16:50:54 | Dave.Jones | link | issue17124 messages |
2013-02-04 16:50:53 | Dave.Jones | create | |
|