-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Description
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:
vscode/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts
Line 133 in 2046205
const profiler = await import('v8-inspect-profiler'); |
and
vscode/src/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.ts
Line 177 in 2046205
const profiler = await import('v8-inspect-profiler'); |
and
vscode/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts
Line 694 in 2046205
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.