medusa icon indicating copy to clipboard operation
medusa copied to clipboard

Use Snapshots

Open azenla opened this issue 9 years ago • 6 comments

If you want speed, you should use snapshots to store pre-parsed Dart Code. It's much more efficient, but it does take slightly more space to store it. https://www.dartlang.org/articles/snapshots/

azenla avatar Apr 04 '15 23:04 azenla

Interesting.... definitely will boost startup times too. Since the snapshot files will be bigger storing them as a BLOB within the SQLite db cache instead of the generated dart code which is being done now should make it work. Only concern is the BLOB I/O performance for SQLite might be a blocker. But fingers crossed. Working on it.

lispyclouds avatar Apr 07 '15 11:04 lispyclouds

Awesome!

azenla avatar Apr 07 '15 12:04 azenla

@rahul080327 What's the status?

azenla avatar Apr 10 '15 05:04 azenla

Didn't get a chance to give it proper time. Will start today hopefully.

lispyclouds avatar Apr 11 '15 05:04 lispyclouds

@kaendfinger Is it possible to create a VM snapshot from code directly without writing it to a file first? For example pass the generated Dart code as a command line param or something similar as compared to the "dart [--package_root=] --snapshot=<output_file> <dart_file>" that we have to do now?

lispyclouds avatar Apr 15 '15 03:04 lispyclouds

@rahul080327 As of right now, you must write to a file.

azenla avatar Apr 15 '15 03:04 azenla