This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author frenzy
Recipients frenzy
Date 2020-05-04.09:08:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org>
In-reply-to
Content
We would like to include a possibility of hardlink deduplication of identical pyc files to compileall module in Python 3.9. We've discussed the change [0] and tested it in Fedora RPM build system via implementation in the compileall2 module [1].

The discussion [0] contains a lot of details so I mention here only the key features:
* the deduplication can be enabled only if multiple optimization levels are processed at once
* it generates a pyc file (optimization level 0) as usual but if it finds that optimized files (optimization levels 1 and 2) have the same content, it uses hardlinks (os.link) to prevents duplicates
* the deduplication is disabled by default

We believe that this might be handy for more Pythonistas. In our case, this functionality lowers the installation size of Python 3.9 from 125 MiB to 103 MiB.

[0] https://discuss.python.org/t/compileall-option-to-hardlink-duplicate-optimization-levels-bytecode-cache-files/3014
[1] https://github.com/fedora-python/compileall2
History
Date User Action Args
2020-05-04 09:08:41frenzysetrecipients: + frenzy
2020-05-04 09:08:41frenzysetmessageid: <1588583321.75.0.545037270294.issue40495@roundup.psfhosted.org>
2020-05-04 09:08:41frenzylinkissue40495 messages
2020-05-04 09:08:41frenzycreate