Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installer: 'precompile standard library' option should pre-compile with -O and -OO #69289

Closed
zware opened this issue Sep 14, 2015 · 6 comments
Assignees
Labels
OS-windows topic-installation type-feature A feature request or enhancement

Comments

@zware
Copy link
Member

zware commented Sep 14, 2015

BPO 25102
Nosy @pfmoore, @tjguk, @zware, @zooba
Files
  • 25102_1.patch
  • 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 = <Date 2015-09-23.01:24:51.937>
    created_at = <Date 2015-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 = <Date 2015-09-23.01:24:51.936>
    user = 'https://github.com/zware'

    bugs.python.org fields:

    activity = <Date 2015-09-23.01:24:51.936>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2015-09-23.01:24:51.937>
    closer = 'steve.dower'
    components = ['Installation', 'Windows']
    creation = <Date 2015-09-14.05:01:16.061>
    creator = 'zach.ware'
    dependencies = []
    files = ['40466']
    hgrepos = []
    issue_num = 25102
    keywords = ['patch']
    message_count = 6.0
    messages = ['250625', '250658', '250672', '250684', '250686', '251367']
    nosy_count = 5.0
    nosy_names = ['paul.moore', 'tim.golden', 'python-dev', 'zach.ware', 'steve.dower']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue25102'
    versions = ['Python 3.5', 'Python 3.6']

    @zware
    Copy link
    Member Author

    zware commented 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.

    @zware zware added topic-installation OS-windows type-feature A feature request or enhancement labels Sep 14, 2015
    @zooba
    Copy link
    Member

    zooba commented Sep 14, 2015

    Doesn't it? It's supposed to...

    @zware
    Copy link
    Member Author

    zware commented 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
    Copy link
    Member

    zooba commented 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
    Copy link
    Member Author

    zware commented Sep 14, 2015

    Steve Dower added the comment:

    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.

    This is pretty low priority, though.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented 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

    @zooba zooba closed this as completed Sep 23, 2015
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-windows topic-installation type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants