Comments (4)
It is on our roadmap, @avp can say more
from hermes.
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:
The ideal serialized format of the heap would be something you could mmap in as writable pages, then reconstruct the stack and continue forward. The main issue to doing this is pointers, because addresses might not be the same when you resume. For JS pointers, we had this covered by compressing them into a heap segment number + offset (encoded as 32 bits, thus compressing a 64 bit pointer). The issue mostly had to do with native pointers to complicated off-heap structures.
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.
If someone in the community knows a creative solution to some of these issues, we welcome suggestions or PRs showing how it could be done.
from hermes.
For the record, we do have heap serialization, but we don't actively support it.
from hermes.
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
from hermes.
Related Issues (20)
- I hope Static Hermes supported Windows, Linux, and MacOS. HOT 2
- Local debug and release build throws a type error HOT 3
- I hope it was possible for Static Hermes to native AOT compile all the existing NPM modules. HOT 1
- Intl.DateTimeFormat does not support 'Europe/Kyiv' timezone HOT 2
- It would be good for Static Hermes if it could use pure JavaScript code(that has no type annotations) with automatic type guessing like "var" code in Dart, or ":=" in Go. HOT 7
- Using Intl with standalone Hermes app HOT 2
- Support for top level await HOT 1
- iphoneos framework very large size issue (build-apple-framework.sh) HOT 7
- [Debugger] Incorrect scope variable information for variable initialized in for-loop HOT 3
- Race Condition between HadesGC and HermesInternal.getEpilogues() Causes Segfault
- Assertion `IDom && "Reached the top of the tree!"' failed in ./hermes/lib/Optimizer/Scalar/Mem2Reg.cpp HOT 1
- prettier plugin: Infinite loop for malformed graphql relay query
- Closures caputure external variable errors HOT 9
- [Profiler] First sample sometimes has timestamp of zero HOT 1
- The Code Sentry scan reports code vulnerabilities - facebook/hermes HOT 2
- Short-hand methods don't have prototype / construct HOT 8
- Linking static hermes HOT 4
- spread arguments throw "constructor not callable" when `Array` variable declared HOT 1
- `atob` is less forgiving with padding than JSC, Node and browser based implementations HOT 3
- Partial async generator support present in Hermes isn't spec compliant HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermes.