mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-46608: exclude marshalled-frozen data if deep-freezing to save 300 KB space (GH-31074)
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 https://github.com/python/cpython/pull/29118#issuecomment-958521863. 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. ```console # du -s ./python before 27892 ./python # du -s ./python after 27524 ./python ``` Automerge-Triggered-By: GH:ericsnowcurrently
This commit is contained in:
parent
9b4e3d94a5
commit
bf95ff91f2
9 changed files with 87 additions and 84 deletions
|
@ -650,6 +650,11 @@ C API Changes
|
|||
fields of the result from the exception instance (the ``value`` field).
|
||||
(Contributed by Irit Katriel in :issue:`45711`.)
|
||||
|
||||
* :c:struct:`_frozen` has a new ``is_package`` field to indicate whether
|
||||
or not the frozen module is a package. Previously, a negative value
|
||||
in the ``size`` field was the indicator. Now only non-negative values
|
||||
be used for ``size``.
|
||||
(Contributed by Kumar Aditya in :issue:`46608`.)
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue