]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46608: exclude marshalled-frozen data if deep-freezing to save 300 KB space ...
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Fri, 4 Feb 2022 17:57:03 +0000 (23:27 +0530)
committerGitHub <noreply@github.com>
Fri, 4 Feb 2022 17:57:03 +0000 (09:57 -0800)
commitbf95ff91f2c1fc5a57190491f9ccdc63458b089e
tree859c08ec6a673693121873c09dbacd148e12bb65
parent9b4e3d94a5746af093392ed8e977b26fcc1bfd11
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
Doc/c-api/import.rst
Doc/whatsnew/3.11.rst
Include/cpython/import.h
Lib/ctypes/test/test_values.py
Misc/NEWS.d/next/Build/2022-02-02-11-26-46.bpo-46608.cXH9po.rst [new file with mode: 0644]
Python/frozen.c
Python/import.c
Tools/freeze/makefreeze.py
Tools/scripts/freeze_modules.py