Re:Lazy deserialization
by m_eiman on Monday February 12, 2018 @01:06PM
(#16360483)
Couldn’t they do this with a copy-on-write initial heap that all the engine instances clone?
[ Parent
| on HN ]
I think that's pretty close to what they're doing, really. Though usually COW refers to doing things on a page by page basis, which probably would not be as effective (since it would copy entire pages, when only a little was needed, so unless you were careful to put related function close together, you'd copy a lot more of the heap than you really want).
You're probably right though. I bet they end up closer and closer to that. Possibly even sharing pages that can't be modified, like code objects. That's what the last sentence or two seems to allude to. Eventually, they'll pretty much be reinventing shared libraries for the JavaScript world. Not that that's a bad thing.