JS Memory & performance profiling
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div>This isn't a jQuery specific question, but hopefully you guys won't mind indulging me, as I think others on the list might benefit from the answer.</div><div>
</div><div>So, the question is, is there a way to profile Javascript memory and/or CPU usage in the different browsers (at least FF and IE) to see what effects the different libraries, methods, etc have on performance on the JS engine itself, or is it simply a matter of inflating the work so that it's more noticeable?</div><div>
</div><div>What I mean is, recently John talked about how the Module pattern takes up significantly more memory than using the prototypal inheritance scheme (see: <a href="http://ejohn.org/blog/simple-class-instantiation/)">http://ejohn.org/blog/simple-class-instantiation/)</a>.</div><div>
</div><div>However, I was wondering if there is a way to test this for ourselves (not because I don't believe John, but more because there are a lot of other techniques I would like to test out).</div><div>Is there a way to see what the memory usage of the JS engine actually is, and not the memory usage of the browser (which could be handling the HTML, and/or a million other variables at any given time not related to the JS)?</div><div>
</div><div>Do you guys have any other favorite profiling techniques, besides console.profile() and JS timers?</div><div>
</div><div>Thanks in advance, and if this email is too far off list scope, let me know :)</div><div>
<div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><div><div>
<b>Nate Cavanaugh</b></div><div>Director of User Interface Engineering</div><div>Liferay, Inc.</div><div>Enterprise. Open Source. For life.</div></div><div>
</div></span></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div>
</div></div>