Skip to content

Exclude marshalled-frozen data if deep-freezing to save 300 KB space #90766

Closed

Description

@kumaraditya303
BPO 46608
Nosy @gvanrossum, @vstinner, @ericsnowcurrently, @miss-islington, @kumaraditya303
PRs
  • bpo-46608: exclude marshalled-frozen data if deep-freezing to save 300 KB space  #31074
  • bpo-46608: Fix argument parsing in freeze_modules.py #31131
  • 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 = None
    closed_at = <Date 2022-02-10.14:11:41.189>
    created_at = <Date 2022-02-02.09:08:27.836>
    labels = ['build', '3.11']
    title = 'Exclude marshalled-frozen data if deep-freezing to save 300 KB space'
    updated_at = <Date 2022-02-26.23:27:26.269>
    user = 'https://github.com/kumaraditya303'

    bugs.python.org fields:

    activity = <Date 2022-02-26.23:27:26.269>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-10.14:11:41.189>
    closer = 'kumaraditya'
    components = ['Build']
    creation = <Date 2022-02-02.09:08:27.836>
    creator = 'kumaraditya'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46608
    keywords = ['patch']
    message_count = 4.0
    messages = ['412346', '412521', '412578', '414122']
    nosy_count = 5.0
    nosy_names = ['gvanrossum', 'vstinner', 'eric.snow', 'miss-islington', 'kumaraditya']
    pr_nums = ['31074', '31131']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46608'
    versions = ['Python 3.11']

    Activity

    1. kumaraditya303 commented on Feb 2, 2022

      @kumaraditya303
      ContributorAuthor

      This reduces the size of the data segment by 300 KB of the executable because if the modules are deep-frozen then the marshalled frozen data just wastes space. This was inspired by comment by @gvanrossum in bpo-29118 (comment). Note: There is a new option --deepfreeze-only in freeze_modules.py to change this behavior, it is on be default to save disk space.

      # du -s ./python before
      27892 ./python
      # du -s ./python after
      27524 ./python

    2. added
      3.11only security fixes
      buildThe build process and cross-build
      on Feb 2, 2022
    3. miss-islington commented on Feb 4, 2022

      @miss-islington
      Contributor

      New changeset bf95ff9 by Kumar Aditya in branch 'main':
      bpo-46608: exclude marshalled-frozen data if deep-freezing to save 300 KB space (GH-31074)
      bf95ff9

    4. gvanrossum commented on Feb 5, 2022

      @gvanrossum
      Member

      New changeset 9d4161a by Kumar Aditya in branch 'main':
      bpo-46608: Fix argument parsing in freeze_modules.py (GH-31131)
      9d4161a

    5. vstinner commented on Feb 26, 2022

      @vstinner
      Member

      https://docs.python.org/dev/whatsnew/3.11.html#c-api-changes documents the addition of the "is_package" member to the _frozen structure, but it doesn't mention the new "get_code" member. Can it be also documented?

    6. 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

    No one assigned

      Labels

      3.11only security fixesbuildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions