Possible to load a snapshot of a package while main script is dynamic?

114 views
Skip to first unread message

Rich E

unread,
Aug 8, 2014, 1:27:11 AM8/8/14
to mi...@dartlang.org
Is it possible to load a snapshot of a package used within a dart script, while the part of the dart script with main() is still loaded dynamically.  My use case is that I am scripting an application with the dart runtime and I'd like to load in a snapshot of some large packages, for example vector_math.  However, the main dart script is live, so every time it is edited it is re-evaluated with a new isolate.

If this is not possible, am I able to somehow glob the package onto the 'full snapshot' that I generated with the gen_snapshot program?

Thanks,
Rich

p.s. Thank you to those responsible for the documentation on snapshots, including the section for embedders.  I have been using this functionality and I find it an amazing piece of tech.

Rich E

unread,
Aug 14, 2014, 3:26:00 AM8/14/14
to mi...@dartlang.org
(bump)

Is this just not a supported feature and my best bet is to hack in the vector_math package into the builtin libs snapshot?  It seems like something useful for serverside apps as well, to be able to load their often used dependencies in a snapshot but a new main script each request.

Best,
Rich


Rich Eakin

unread,
Mar 24, 2015, 9:55:45 PM3/24/15
to mi...@dartlang.org, vm-...@dartlang.org
I just saw this changeset: https://codereview.chromium.org/1023753006/

Description: "First step towards splitting a full snapshot into a vm isolate snapshot and a
regular isolate snapsot."

I wonder, is it all related to being able to load and operate with multiple snapshots?  I think this would be a super cool feature.

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Rich Eakin

unread,
Jun 8, 2015, 10:28:31 PM6/8/15
to mi...@dartlang.org, vm-...@dartlang.org
Ah, correct me if I'm wrong, but I belive this is the feature I've been waiting for: https://codereview.chromium.org/1168223002/

Looking forward to trying that out!

</end conversation with myself>
Reply all
Reply to author
Forward
0 new messages