microsoft / vscode-js-profile-visualizer

A custom editor for viewing `.cpuprofile` files in VS Code
MIT License
139 stars 29 forks source link

feat: support heap snapshots #156

Closed connor4312 closed 1 year ago

connor4312 commented 1 year ago

Supports heap snapshots using the new @vscode/v8-heap-parser module. The parser runs in a Node.js worker_thread on the extension host, and is queried by postmessage RPC from connected webviews.

This adds a table view and a cytoscape-powered graph view of retainers, in the 'flame' package, as seen in pacific standup yesterday.

Most of the work in this PR is reworking the existing structures to support asynchronously loading data. Heap snapshots are big, far bigger than CPU profiles or heap profiles, so we don't want to load it into memory all at once.

Closes https://github.com/microsoft/vscode-js-debug/issues/1855