We are embedding V8 into our shared library that is accessed in two ways. The first is through a node module we built. We also have daemonized services that access the library directly, not through node. We are seeing performance problems in both, and think there may be a problem with the V8 linking in node and us linking it in separately.
On Tuesday, November 24, 2015 at 2:53:37 AM UTC-8, Jakob Kummerow wrote: > > How do you link your embedding application? > > On Tue, Nov 24, 2015 at 1:13 AM, Nick Sorrentino <ni...@metavine.com > <javascript:>> wrote: > >> Yes I have the same results when running d8, so it must be an issue in >> the way I have it built up. Do I need to initialize V8 different now to >> utilize snapshots? Or possibly a change to my make script? The embedders >> guide mentions a method InitializeExternalStartupData, but that looks like >> it is not in version 4.5. >> >> On Monday, November 23, 2015 at 1:36:39 AM UTC-8, Jakob Kummerow wrote: >> >>> Well, for me turning the snapshot on or off reproduces exactly what >>> you're seeing, and I'm not seeing any other regressions: >>> >>> current tip of tree: >>> $ time out/x64.release/d8 -e "" >>> real *0m0.011s* >>> user 0m0.003s >>> sys 0m0.008s >>> >>> current tip of tree, snapshot=off: >>> $ time out/x64.release/d8 -e "" >>> real *0m0.064s* >>> user 0m0.052s >>> sys 0m0.012s >>> >>> branch-heads/4.5: >>> $ time out/x64.release/d8 -e "" >>> real *0m0.014s* >>> user 0m0.007s >>> sys 0m0.007s >>> >>> branch-heads/4.5, snapshot=off: >>> $ time out/x64.release/d8 -e "" >>> real *0m0.094s* >>> user 0m0.086s >>> sys 0m0.008s >>> >>> branch-heads/4.1: >>> $ time out/x64.release/d8 -e "" >>> real *0m0.015s* >>> user 0m0.005s >>> sys 0m0.010s >>> >>> branch-heads/4.1, snapshot=off: >>> $ time out/x64.release/d8 -e "" >>> real *0m0.089s* >>> user 0m0.077s >>> sys 0m0.012s >>> >>> >>> On Sat, Nov 21, 2015 at 7:19 PM, Nick Sorrentino <ni...@metavine.com> >>> wrote: >>> >>>> Sorry, I should have mentioned, we did try with both snapshot on and >>>> off and still had the same performance issue. >>>> >>>> On Saturday, November 21, 2015 at 3:26:15 AM UTC-8, Jakob Kummerow >>>> wrote: >>>>> >>>>> The purpose of the snapshot is to speed up Isolate and Context >>>>> creation. If you build with snapshot=off, startup will be slower. >>>>> >>>>> (Also, I'm really glad you're moving away from version 3.32.3, which >>>>> was just a random daily snapshot, not suitable for production use.) >>>>> >>>>> On Sat, Nov 21, 2015 at 2:34 AM, Nick Sorrentino <ni...@metavine.com> >>>>> wrote: >>>>> >>>>>> We recently updated our version of V8 from 3.32.3 to 4.5.103.35. We >>>>>> are seeing a major performance impact on Isolate and Context creation. >>>>>> >>>>>> In version 4.1 we were seeing times around 6ms and on 4.5 we are >>>>>> seeings times around 45ms. The code we are benching marking is below. >>>>>> Any >>>>>> guidance here? >>>>>> >>>>>> >>>>>> // Initialise the isolate create parameters >>>>>> >>>>>> Utility::ArrayBufferAllocator allocator; >>>>>> >>>>>> v8::Isolate::CreateParams create_params; >>>>>> >>>>>> create_params.array_buffer_allocator = &allocator; >>>>>> >>>>>> >>>>>> >>>>>> // Create a v8 isolate object >>>>>> >>>>>> v8::Isolate* pIsolate = v8::Isolate::New( create_params ); >>>>>> >>>>>> >>>>>> >>>>>> // Execute the script >>>>>> >>>>>> { >>>>>> >>>>>> // Lock the v8 isolate object >>>>>> >>>>>> v8::Locker oLocker( pIsolate ); >>>>>> >>>>>> >>>>>> >>>>>> // Create a scope for the v8 isolate object >>>>>> >>>>>> v8::Isolate::Scope oIsolateScope( pIsolate ); >>>>>> >>>>>> >>>>>> >>>>>> // Create a handle scope >>>>>> >>>>>> v8::HandleScope oHandleScope( pIsolate ); >>>>>> >>>>>> >>>>>> >>>>>> // Create a template for the global object where we set the >>>>>> built-in global functions. >>>>>> >>>>>> v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate:: >>>>>> New( pIsolate ); >>>>>> >>>>>> >>>>>> >>>>>> // Bind the functions to the global object template >>>>>> >>>>>> global->Set( v8::String::NewFromUtf8( pIsolate, u8 >>>>>> "VEUnconfigureAnchorContext" ), v8::FunctionTemplate::New( pIsolate, >>>>>> LocalUnconfigureAnchorContext, v8::External::New( pIsolate, >>>>>> m_pScriptObject ) ) ); >>>>>> //more methods added here (~200) >>>>>> >>>>>> // Create a new context based on the global object template >>>>>> >>>>>> v8::Handle<v8::Context> oContext = v8::Context::New( pIsolate >>>>>> , NULL, global ); >>>>>> >>>>>> } >>>>>> >>>>>> >>>>>> How We are making version 3.32 >>>>>> make library=shared soname_version=3.32.3 i18nsupport=off >>>>>> OUTDIR=../$(DEPS_BUILD_BASE_DIR)v8 x64.release >>>>>> >>>>>> How We are making version 4.5 >>>>>> >>>>>> make library=shared soname_version=4.5.103 i18nsupport=off >>>>>> snapshot=off OUTDIR=../$(DEPS_BUILD_BASE_DIR)v8 x64.release >>>>>> >>>>>> >>>>>> >>>>>> Any advice our guidance would be greatly appreciated. >>>>>> >>>>>> -- >>>>>> -- >>>>>> v8-users mailing list >>>>>> v8-u...@googlegroups.com >>>>>> http://groups.google.com/group/v8-users >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "v8-users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to v8-users+u...@googlegroups.com. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>> -- >>>> v8-users mailing list >>>> v8-u...@googlegroups.com >>>> http://groups.google.com/group/v8-users >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "v8-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to v8-users+u...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> -- >> v8-users mailing list >> v8-u...@googlegroups.com <javascript:> >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+u...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.