I am interested in know how much memory my JavaScript code running inside a browser is consuming and how it is increasing decreasing with time. How do I do it ?
-
http://stackoverflow.com/questions/20376/javascript-profiler-in-ie – JamesHalsall Sep 22 '11 at 12:32
-
possible duplicate of [What is the best way to profile javascript execution?](http://stackoverflow.com/questions/855126/what-is-the-best-way-to-profile-javascript-execution) – outis Feb 05 '12 at 00:22
3 Answers
http://getfirebug.com/javascript
Firebug
includes a powerful JavaScript debugger
that lets you pause execution at any time and see what each variable looked like at that moment. If your code is a little sluggish, use the JavaScript profiler to measure performance
and find bottlenecks fast.
Edit : You may refer previously answered questions on stackoverflow.
Javascript memory profiler for Firefox
Measuring Javascript performance in IE
How to profile and and get Javascript performance
http://www.imnmotion.com/documents/html/technical/dhtml/jsprof.html

- 1
- 1

- 35,388
- 41
- 123
- 155
If you are using FireFox then Firebug is perfect for this application. I'd highly recommend it for debugging javascript in browser.
StackOverflow: what-is-the-best-way-to-profile-javascript-execution
Looks like this would be a good answer for you too.
It depends on your browser... If you're using Chrome (that's what i'm using...):
- Open up the page
- Right click anywhere -> Inspect element (opens up Dev toolbar)
- Go to Profiles tab
- Click the little "recording" icon (cirle) at the bottom of the screen (4th button)
- When it's read it's indicating it's recording
- Do your thing
- Click the rec button again
- enjoy the statistics

- 1,159
- 8
- 14