Javascript memory monitor? [duplicate]
开发者_开发知识库Possible Duplicate:
Javascript memory profiler
I like to know what variables take how much memory in Javascript. Is it even possible to do it?
What you are looking for isn't called "memory monitor". It's called "profiler".
Javascript memory profiler for Firefox e.g. has info for Javascript profilers for running Javascript in Firefox. Google has lots of profilers for Javascript in various environments: Just search for "profiler javascript"
The webkit inspector in Chrome has a profiler built in that is great for that kind of thing.
As an added bonus it also shows you all browser events such as repaints, so you can engineer your code to have the least impact on the browser.
See this question and answer
精彩评论