Inada Naoki <songofaca...@gmail.com> added the comment:
I'm big -1 too. But I am interested in Instagram usage. * How % of heap are CoW-ed with gc.freeze()? * When CoW happen? in execution time, or shutdown? * Which type cause CoW? I have two ideas to reduce CoW: * Fast shutdown option Currently Python try to free object as possible in finalization. It will cause much CoW. It will very bad for applications using multiprocessing.Pool for parallel processing of large data. * Use "legacy" Unicode representation for large strings. Unicode is cold, immutable. But refcount is not immutable. Currentlly, most unicode object is "compact": object header and data is in one memory block. We may be able to use "legacy" representation and put cold data into another page. For long term, multi process friendly `pyc` format can share more memory inter processes, even though they are not created by prefork. ---------- nosy: +methane _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40255> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com