Is there anything like clj-memory-meter for ClojureScript? https://github.com/clojure-goes-fast/clj-memory-meter I’m trying to use the chrome dev tools but am getting lost in the thousands of objects there, and all the different concepts, when all I want to do is to see how much memory a particular data structure I have consumes over some usage.
You can use Memory tab in chrome dev tools to take heap snapshot and inspect it
Thanks. That’s what I have been trying to use, but where I get lost. An example would be awesome.
have you seen this guide on memory profiling? https://github.com/GoogleChrome/devtools-docs/blob/master/docs/javascript-memory-profiling.md
Yeah, it’s a lot! But if I know how to find my datastructure of interest in there I could probably make do. clj-memory-meter seems so exactly like what I want. 😃 I wonder if it would be possible to create something similar…
You can put your values in some global property and then find it in a snapshot under window object window.MYDATA = myvalue
I also have a Node playground here https://github.com/roman01la/js-memory-usage But not sure if it will run since it’s fairly old
Sweet! I will check out.