The plugin is now deprecated. V8 heap snapshot generation is now integrated with Webapck bundling being an optional optimization step after code bundling. We recommend migrating your apps to use nativescript-dev-webpack
with enabled snapshot generation. More info on how to setup Webpack bundling in NativeScript you can find here.
This repo provides tools to generate and distribute V8 heap snapshot packages of the Core NativeScript / NativeScript+Angular modules to reduce the startup time of the NativeScript Android Runtime.
For more information follow NativeScript#1563 and look at the Android Runtime docs.
/bundler
- A JavaScript module bundler and tool to create snapshot packages./plugin
- NativeScript plugin that downloads the correct snapshot package and prepares the app for using it.To install the plugin:
tns install android-snapshot
Startup time tested on a Nexus 5 device:
Configuration | Core NativeScript | NativeScript+Angular |
---|---|---|
Non-bundled | 2350ms | 4000ms |
Bundled | 2100ms | 3600ms |
Bundled with snapshot | 1600ms | 2100ms |