Den 1. jun. 2010 23.30 skrev Chinnu <[email protected]>: > Hi, > > I'm trying to run different scripts, one after another, in a context. > The context has a global object template associated with it, which > contains some DOM bindings. > > I'm trying to avoid the necessity of creating and disposing the > context for compiling and running each script. This takes up some time > in spite of using the snapshot feature. > > After running a script, is it possible to clear the context and return > it to its state before the script was run? Or, is there a quick way to > create a context out of an existing context (like cloning)?
There's no way to clear a context. Creating a context with snapshots should take around 250us on a desktop machine. The only other way to clone a context is to clone the whole process by using the OS vfork call. -- Erik Corry -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
