Skip to content

inspector: use BaseObject for JS binding

Rodrigo Muino Tomonari requested to merge github/fork/TimothyGu/inspector into master

Use internal fields instead of the less efficient v8::External for storing the pointer to the C++ object.

'use strict';
const { Session } = require('inspector');
console.time('a');
for (var i = 0; i < 100000; i++) {
  var c = new Session();
  c.connect();
  c.disconnect();
}
console.timeEnd('a');

becomes faster by 30%, primarily because of the cached ObjectTemplate I think.

Refs: #13503 (closed)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

inspector

Merge request reports

Loading