[issue11051] system calls per import
Charles-François Natali
report at bugs.python.org
Mon Dec 5 19:32:51 CET 2011
Charles-François Natali <neologix at free.fr> added the comment:
Here's a trivial patch reducing the number of calls to open.
before:
"""
$ strace -c -e open ./python -c ""
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000049 0 392 306 open
------ ----------- ----------- --------- --------- ----------------
100.00 0.000049 392 306 total
"""
after:
"""
$ strace -c -e open ./python -c ""
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000024 0 86 open
------ ----------- ----------- --------- --------- ----------------
100.00 0.000024 86 total
"""
As for the flury of tentative locations, I don't feel like modifying this since I'm not familiar enough with the import machinery.
----------
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file23858/import_stat.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11051>
_______________________________________
More information about the Python-bugs-list
mailing list