Quill
Quill2mo ago

Memory profiling

What's the best way to profile code to figure out if I'm having a deno, library or host issue? I have roughly the same code running in the browser as some dockerized deno but keep OOMing. My logs are less than useful and I'd love to figure out some memory profiling. The package I'm using is written for node and has some quirks in deno. I need to investigate if my code needs or if I need to write a formal deno package.
4 Replies
marvinh.
marvinh.2mo ago
Pass either the --inspect or --inspect-brk flag to deno run (similar to node). This will allow you to attach the Chrome DevTools frontend where you can take heap snapshots and stuff
Quill
QuillOP2mo ago
Ohhh yeah. Does that work over an SSH host too?
marvinh.
marvinh.2mo ago
not sure, I've never tried that
Quill
QuillOP2mo ago
If I figure it out I promise to pay it forward and teach others. Thanks for your help!

Did you find this page helpful?