Embedding V8 in the real world
summary
NativeScript embeds V8 and ships a full engine per APK, uses a metadata generator to parse SDK bytecode at build time, and marshals Java ↔ JavaScript via a JNI bridge to return proxied native objects. Worker threads use separate V8 isolates so memory is isolated and messages are serialized. Startup time drops from ~2s by bundling with webpack and using a V8 snapshot binary produced at build time. Garbage collection uses finalizers and strong/weak refs.
AI-written summary · about
chapters (16)
- 0:00Start
- 0:57Introduction
- 3:48Native API Access
- 4:16The Application Package
- 6:37Metadata Generator
- 11:12A slight complication.
- 11:27Marshalling
- 12:57Objects lifecycle
- 13:08Garbage collection
- 13:45Synchronization by the NativeScript Runtime
- 15:54Android GC
- 18:33Multithreading
- 22:42Worker threads
- 25:44File System Requests
- 30:42Loading snapshots
- 31:13Limitations
related talks
31mEmbedding V8 in the Real World
26mEmbedding V8 in the real world
28mThe Hidden Features from V8 to Boost Your React Native Apps
35mA Friend in needs a Js indeed
26mnative.js: JavaScript in your native mobile apps
17mV8 engine, JS Code Interpretation, and Execution
33mJavaScript: The V8 Engine optimization tips (...)
47mAn Introduction to NativeScript
