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
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 stuffOhhh yeah. Does that work over an SSH host too?
not sure, I've never tried that
If I figure it out I promise to pay it forward and teach others. Thanks for your help!