New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heap snapshot support #35
Comments
It is on our roadmap, @avp can say more |
Sorry that we haven't gotten back to this issue in a while, but unfortunately we took it off our roadmap. I'll summarize the main issues that we've faced trying to implement this: So, failing to find a solution that allowed an mmap, we tried defining a serialization format for each object, and pointers to off-heap structures were copied into a separate portion of the file, and a fake pointer was inserted that would need a fixup pass. This mechanism required allocating all the memory piece-by-piece into the GC again, and this turned out to be too slow, for most test cases it was about the same as running the original JS from the beginning. Another big blocker is what to do with HostObjects and HostFunctions. These are critical to React Native and are used very early in Hermes's startup path. We would have to provide a custom serializer, and these HostObjects might point to things like Java resources, or files, or various other things that would be very hard to deserialize, and might not even be usable when they were deserialized (like a short-lived URL, for example). We haven't found anything that definitively solves these problems, so we took it off our roadmap. |
For the record, we do have heap serialization, but we don't actively support it. |
I know, that this is not a support forum, but Hermes does not have any so, I would appreciate if you could give some hints where to look for :) Thank you |
I'm looking for a JS engine with the ability to take snapshots of the JS heap at an arbitrary points in time. The idea is for snapshots to be serialized, saved to disk, and later deserialized in a completely different process to continue execution. V8 can do this with its
SnapshotCreator
but it can be a rather slow process.I scanned through the code but didn't find anything. I was wondering if:
The text was updated successfully, but these errors were encountered: