Hacker News new | past | comments | ask | show | jobs | submit login

Last I heard, forking wasn’t a very effective memory-sharing technique on CPython because of the way it does reference counting: if you load things in before you fork, when the children start doing work they update the refcounts on all those pre-loaded objects and scribble all over that memory, forcing most of the pages to be copied anyway.

There seems to have been some recent-ish work on improving this, though: https://peps.python.org/pep-0683/#avoiding-copy-on-write




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: