Hi I have previously asked this question in python-list, however I think it belongs here.
I'm running python 2.7.1 on an embedded Linux board and noticed it takes 1.8 seconds to execute the most simple "Hello World" script. Platform: cpu: 200Mhz ARM (ARM926EJ-) kernel: 2.6.38 uClibc: 0.92.1-rc2 Using strace I found that python is attempting to open 168 non-existent files during startup, see trace: http://www.veritrack.co.uk/static/images/strace-hello-py.txt I think this is normal behavior but more noticeable due to the embedded environment. 1. Is there anything I can do at compile time to tell Python these files don't exist and avoid trying to open them? 2. Is it possible to make python first try and open the ".pyc" and only then look for ".py" ? [root@vx-200 /]# cat hello.py #!/usr/bin/python print "Hello World!!" [root@vx-200 /]# [root@vx-200 /]# time ./hello.py Hello World!! real 0m1.781s user 0m1.530s sys 0m0.230s Thanks Bruce
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com