[issue13150] Most of Python's startup time is sysconfig

Antoine Pitrou report at bugs.python.org
Tue Oct 11 15:37:05 CEST 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

Actually, a big part of that is compiling some regexes in the tokenize module. Just relying on the re module's internal caching shaves off 20% of total startup time.

Before:

$ time ./python -S -c 'import tokenize'

real	0m0.034s
user	0m0.030s
sys	0m0.003s
$ time ./python -c ''

real	0m0.055s
user	0m0.050s
sys	0m0.005s

After:

$ time ./python -S -c 'import tokenize'

real	0m0.021s
user	0m0.019s
sys	0m0.001s
$ time ./python -c ''

real	0m0.044s
user	0m0.038s
sys	0m0.006s

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13150>
_______________________________________


More information about the Python-bugs-list mailing list