|
|
|
|
|
by kroolik
1061 days ago
|
|
One annoying part with multiprocessing in Python is that you could abuse the COW mechanism to save on loading time when forking. But Python stores ref counters together with objects so every single read will bust your COW cache. Now, you wanted it simple, but got to fight with the memory model of a language that wasn't designed with performance in mind, for programs whose focus wasn't performance. |
|
If you load something big before forking workers, there's no CoW issue with that big structure anymore.