You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows installer: 'precompile standard library' option should pre-compile with -O and -OO #69289
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/zooba'closed_at=<Date2015-09-23.01:24:51.937>created_at=<Date2015-09-14.05:01:16.061>labels= ['type-feature', 'expert-installation', 'OS-windows']
title="Windows installer: 'precompile standard library' option should pre-compile with -O and -OO"updated_at=<Date2015-09-23.01:24:51.936>user='https://github.com/zware'
Since the default all-users install location is now Program Files and thus not world-writable and with the advent of optimization-tagged .pyc files, the 'precompile' option in the installer should also precompile with -O and -OO.
It doesn't appear to; my 'C:\Program Files\Python 3.5\Lib\pycache' is full of .pyc's, but none with an optimization tag. To confirm with math rather than eyesight, according to 'dir' there are 168 files in Lib\, and 168 in Lib\pycache rather than the expected 168*3.
For the record, I have not run this Python as a privileged user, so the contents of __pycache__ are not incidental; they were definitely created by the precompile option.
You're proposing making a slow part of the install three times slower, correct? Just to confirm :)
Indeed I am :). Or extend the precompile options to let the user do whatever of the three they want.
The precompile option is meant as a startup time optimization. -O and -OO are meant as (very slim) runtime optimizations; it only makes sense that people actually concerned enough to use -O/-OO would rather have their startup time optimized as well.
Activity
zware commentedon Sep 14, 2015
Since the default all-users install location is now Program Files and thus not world-writable and with the advent of optimization-tagged .pyc files, the 'precompile' option in the installer should also precompile with -O and -OO.
zooba commentedon Sep 14, 2015
Doesn't it? It's supposed to...
zware commentedon Sep 14, 2015
It doesn't appear to; my 'C:\Program Files\Python 3.5\Lib\pycache' is full of .pyc's, but none with an optimization tag. To confirm with math rather than eyesight, according to 'dir' there are 168 files in Lib\, and 168 in Lib\pycache rather than the expected 168*3.
For the record, I have not run this Python as a privileged user, so the contents of __pycache__ are not incidental; they were definitely created by the precompile option.
zooba commentedon Sep 14, 2015
Right, it's just doing the single pass.
You're proposing making a slow part of the install three times slower, correct? Just to confirm :)
zware commentedon Sep 14, 2015
Steve Dower added the comment:
Indeed I am :). Or extend the precompile options to let the user do whatever of the three they want.
The precompile option is meant as a startup time optimization. -O and -OO are meant as (very slim) runtime optimizations; it only makes sense that people actually concerned enough to use -O/-OO would rather have their startup time optimized as well.
This is pretty low priority, though.
python-dev commentedon Sep 23, 2015
New changeset 31b230e5517e by Steve Dower in branch '3.5':
Issue bpo-25102: Windows installer does not precompile for -O or -OO.
https://hg.python.org/cpython/rev/31b230e5517e