Two more V8Js releases

Today as well as last Thursday I uploaded two more V8Js releases to PECL, both fixing issues around v8::FunctionTemplate usage that bit me at work. Those v8::FunctionTemplate objects are used to construct constructor functions (and thus object templates) in V8. The problem with them? They are not object to garbage collection. So if we export a object with a method attached to it from PHP to JS, V8Js at first exports the object (and caches the v8::FunctionTemplate used to construct it; re-using it on subsequent export of the same class)....

Planted: Sep 1, 2015 · 1 min

Poor V8Function call performance

Today I noticed, that invocations of V8Function objects have a really poor call performance. A simple example might be: $v8 = new V8Js(); $func = $v8->executeString('(function() { print("Hello\\n"); });'); for($i = 0; $i < 1000; $i ++) { $func(); } … on my laptop this takes 2.466 seconds (with latest V8Js 0.2.1); older versions like V8Js 0.1.5 even take 80 seconds. That felt strange, since V8Js performance generally is pretty good and the slightly changed version...

Planted: Aug 26, 2015 · 1 min