On May 17, 10:12 am, Andrew <[email protected]> wrote:
> I have a large OO Javascript application. No page reloads, lots of
> AJAX, DOM manipulation, jQuery etc.
>
> I'm looking for the ability to analyse the Javascript heap, so I can
> work out where I lose memory as my Javascript application is being
> used. I know most of my leaks come from closures, after using the heap
> snapshot capability in Chrome (http://zetafleet.com/blog/google-
> chromes-heap-profiler-and-memory-timeline).
>
> However, Chrome's tool isn't great at determining where in my code
> these closures still exist, so its a case of snipping out bits of code
> repeatedly till you find what works. Which is a very time consuming
> way of doing things.
>
> Ideally, I would want a list of closures that are still in memory, and
> a reference the code that created them. A tree coming from the garbage
> collector's roots showing how every object in memory is reached from
> those roots would also be incredible.
>
> Does anyone know if Firebug can help me here, and if not, what can?

At present we can't do this. But if you provided a simple test case
demonstrating a memory leak via a closure, I believe a tool can be
created.  We have a trivial mark and sweep leak tool now, we have the
ability to see closure variables (except when Mozilla platform flakes
out), so we should be able to put them together. But I don't want to
do it until I see an actually test case that can prove the tool works.

http://code.google.com/p/fbug/issues/list

jjb

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to