✕
Skip to content

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

Closed

Description

@zware
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']

    Activity

    1. zware commented on Sep 14, 2015

      @zware
      MemberAuthor

      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.

    2. zooba commented on Sep 14, 2015

      @zooba
      Member

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

    3. zware commented on Sep 14, 2015

      @zware
      MemberAuthor

      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.

    4. zooba commented on Sep 14, 2015

      @zooba
      Member

      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 :)

    5. zware commented on Sep 14, 2015

      @zware
      MemberAuthor

      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.

    6. python-dev commented on Sep 23, 2015

      python-devmannequin
      Mannequin

      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

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions