Javascript memory profiler for Firefox

seth picture seth · Oct 5, 2008 · Viewed 34.6k times · Source

Is there a tool/plugin/function for Firefox that'll dump out a memory usage of Javascript objects that you create in a page/script? I know about Firebug's profiler but I'd like something more than just times. Something akin to what Yourkit has for Java profiling of memory usage.

Reason is that a co-worker is using id's for "keys" in an array and is creating 1000's of empty slots when he does this. He's of the opinion that this is harmless whereas my opinion differs. I'd like to offer some proof to prove whether I'm right or not.

Answer

Gene T picture Gene T · Oct 5, 2008

I haven't tried the Sofware verify tools, but Mozilla has tools that track overall memory consumed by firefox for the purpose of stemming leaks:

http://www.mozilla.org/performance/tools.html

and:

https://wiki.mozilla.org/Performance:Leak_Tools

There's also this guy saying to avoid large arrays in the context of closures, towards article bottom

http://ajax.sys-con.com/node/352585