[issue25159] Import time regression

2015-09-18 Thread Brett Cannon

Brett Cannon added the comment:

It should also be mentioned that startup time from 3.4 to default has not been 
affected according to Intel's daily benchmark run which is usually the most 
obvious place you see import performance issues:

normal_startup0.63661%  0.39540%  0.45931%  5.22018%

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not startup time, this is import time. All binaries were compiled in 
release mode. The regression is reproducible with other modules.

$ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 "import zipfile"; done

Python 3.4:
1 loops, best of 1: 46 msec per loop
1 loops, best of 1: 45.3 msec per loop
1 loops, best of 1: 45.9 msec per loop
1 loops, best of 1: 45.1 msec per loop
1 loops, best of 1: 45.3 msec per loop

Python 3.5:
1 loops, best of 1: 49.1 msec per loop
1 loops, best of 1: 49.9 msec per loop
1 loops, best of 1: 50 msec per loop
1 loops, best of 1: 49.9 msec per loop
1 loops, best of 1: 53.7 msec per loop

Python 3.6:
1 loops, best of 1: 66.3 msec per loop
1 loops, best of 1: 64.2 msec per loop
1 loops, best of 1: 64.6 msec per loop
1 loops, best of 1: 65.1 msec per loop
1 loops, best of 1: 64.2 msec per loop

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-18 Thread STINNER Victor

STINNER Victor added the comment:

Even if Python 3.5 startup is slower than Python 3.4 startup, I'm more 
concerned by Python 3.6! What happens in Python 3.6? Are you sure that all 
binaries were compiled in release mode?

Why do you import enum? The bare minimum is "pass" :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-18 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-18 Thread Brett Cannon

Brett Cannon added the comment:

I don't know how much of this is directly importlib's fault, at least in the 
3.5 -> 3.6 case, as very little has changed in the bootstrap code since 3.6 
started: https://hg.python.org/cpython/log/default/Lib/importlib/_bootstrap.py 
and 
https://hg.python.org/cpython/log/default/Lib/importlib/_bootstrap_external.py 
and https://hg.python.org/cpython/log/default/Python/import.c .

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-18 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-17 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

There are regressions in import time in 3.5 and 3.6.

$ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 "import enum"; done

Python 3.4:
1 loops, best of 1: 3.45 msec per loop
1 loops, best of 1: 3.43 msec per loop
1 loops, best of 1: 3.55 msec per loop
1 loops, best of 1: 3.54 msec per loop
1 loops, best of 1: 3.42 msec per loop

Python 3.5:
1 loops, best of 1: 4.38 msec per loop
1 loops, best of 1: 4.31 msec per loop
1 loops, best of 1: 4.32 msec per loop
1 loops, best of 1: 4.32 msec per loop
1 loops, best of 1: 4.4 msec per loop

Python 3.6:
1 loops, best of 1: 20.2 msec per loop
1 loops, best of 1: 20.2 msec per loop
1 loops, best of 1: 22 msec per loop
1 loops, best of 1: 20.3 msec per loop
1 loops, best of 1: 20.4 msec per loop


$ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 -s "import sys; 
sys.modules.clear()" -- "import enum"; done

Python 3.4:
1 loops, best of 1: 29.5 msec per loop
1 loops, best of 1: 29.3 msec per loop
1 loops, best of 1: 30 msec per loop
1 loops, best of 1: 28.9 msec per loop
1 loops, best of 1: 29.2 msec per loop

Python 3.5:
1 loops, best of 1: 43.8 msec per loop
1 loops, best of 1: 44 msec per loop
1 loops, best of 1: 43.5 msec per loop
1 loops, best of 1: 43.1 msec per loop
1 loops, best of 1: 43.8 msec per loop

Python 3.6:
1 loops, best of 1: 59.8 msec per loop
1 loops, best of 1: 59.1 msec per loop
1 loops, best of 1: 58.8 msec per loop
1 loops, best of 1: 58.6 msec per loop
1 loops, best of 1: 61.9 msec per loop


And even in importing already imported and cached module there is small 
regression.
$ for i in `seq 5`; do ./python -I -m timeit "import enum"; done

Python 3.4:
10 loops, best of 3: 3.04 usec per loop
10 loops, best of 3: 3.07 usec per loop
10 loops, best of 3: 3.08 usec per loop
10 loops, best of 3: 3.11 usec per loop
10 loops, best of 3: 3.04 usec per loop

Python 3.5:
10 loops, best of 3: 3.27 usec per loop
10 loops, best of 3: 3.22 usec per loop
10 loops, best of 3: 3.18 usec per loop
10 loops, best of 3: 3.28 usec per loop
10 loops, best of 3: 3.17 usec per loop

Python 3.6:
10 loops, best of 3: 3.29 usec per loop
10 loops, best of 3: 3.26 usec per loop
10 loops, best of 3: 3.34 usec per loop
10 loops, best of 3: 3.35 usec per loop
10 loops, best of 3: 3.35 usec per loop

--
messages: 250941
nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Import time regression
type: performance
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com