Skip to content

Sandbox: move v8-inspect-profiler out of renderer #111211

@bpasero

Description

@bpasero

Looking through the list of node modules we still depend on from the renderer I came across v8-inspect-profiler. My understanding is that we use this native module for:

  • profiling VSCode itself (but this seems to be triggered from the main process so it seems fine?)
  • profiling extensions (inside the extension host)
  • saving profiles to disk (from renderer)

I think the first two usages are fine and will stay supported even in sandbox mode where the extension host will still be allowed to access node. My question is wether we can move the dependency from the renderer out into the extension host possibly?

The relevant location in code seems to be:

const profiler = await import('v8-inspect-profiler');

and

const profiler = await import('v8-inspect-profiler');

and

const profiler = await import('v8-inspect-profiler');

If we cannot move this into the extension host, then I can possibly expose a new method from the native host service to do so via IPC.

Metadata

Metadata

Assignees

Labels

debtCode quality issuesengineeringVS Code - Build / issue tracking / etc.sandboxRunning VSCode in a node-free environment

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions