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

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

Closed
kumaraditya303 opened this issue Feb 2, 2022 · 4 comments
Closed
Labels
3.11 build The build process and cross-build

Comments

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Feb 2, 2022

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

    @kumaraditya303
    Copy link
    Contributor Author

    kumaraditya303 commented Feb 2, 2022

    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

    @kumaraditya303 kumaraditya303 added 3.11 build The build process and cross-build labels Feb 2, 2022
    @miss-islington
    Copy link
    Contributor

    miss-islington commented Feb 4, 2022

    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

    @gvanrossum
    Copy link
    Member

    gvanrossum commented Feb 5, 2022

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

    @vstinner
    Copy link
    Member

    vstinner commented Feb 26, 2022

    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?

    @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
    3.11 build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants