June 2017
Intermediate to advanced
873 pages
18h 9m
English
One of the advantages of running a Dart app on its own VM is that we can apply snapshotting, thereby reducing the startup time compared to JavaScript. A snapshot is a file with an image of your app in the byte form, containing all the Dart objects as they appear in the heap memory.
To generate a script snapshot file called prorabbits from the Dart script prorabbits.dart, issue the following command:
dart --snapshot=prorabbits prorabbits.dart
Then, start the app with dart prorabbits args, where args stands for optional arguments needed by the script.
A script snapshot is the byte representation of the app's objects in the memory (more precisely in the heap of the started isolate) after it is loaded, ...
Read now
Unlock full access