4. dec. 2010 06.32 skrev hua ye <[email protected]>:
> Dears,
>
> If it has a way to create a context with an already initialized global
> object?
>
> Like:
>
> v8::Persistent<v8::Context>  context1 = v8::Context::New();
> v8::Persistent<v8::Object> global =
> v8::Persistent<v8::Object>::New(context1->Global());
>
> How to create context2 using the global objected?
> The reason why to do this is I want to reduce the cost of create a new
> context.

I hope you are already using snapshots.  It makes it more complicated
to compile V8 but it makes a huge difference to the context creation
time.

If you are using the scons builder then the option you need is snapshot=on

>
> Best Regards,
> Kenny
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>



-- 
Erik Corry, Software Engineer
Google Denmark ApS - Frederiksborggade 20B, 1 sal,
1360 København K - Denmark - CVR nr. 28 86 69 84

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to