Firebug Memory Leak - Is any new (release or beta) version that fixes that?

278 views
Skip to first unread message

patrickdrd

unread,
Jul 30, 2007, 8:35:39 AM7/30/07
to Firebug
Hi everyone!

According to the following:

http://www.nabble.com/Memory-Leak-in-Firebug-tf3603316.html#a10071790

firebug has a memory leak (mostly due to its network tab),
with I totally agree with,
because fx's memory handling has been great after disabling firebug,

but, I like firebug and I need that, but I need it stable too, so,
is there any new version out that fixes that leak?

Thanks in advance!

John J Barton

unread,
Jul 30, 2007, 12:08:28 PM7/30/07
to Firebug
Please re-read the post you quoted. There is no leak.

Nobody has produced a test case demonstrating a leak. The Net tab
stores information about your page loads. If you do a lot of page
loads Net tab will store a lot of information for you. If you don't
want Net tab to store stuff, use Firebug->Net-Options-
>DisableNetworkMonitor.

If there is another behavior you want from the Net tab, please produce
a test case and explain what behavior you want. Just claiming there
is a leak is not helpful.

John.

patrickdrd

unread,
Jul 30, 2007, 3:40:09 PM7/30/07
to Firebug
I wouldn't agree with you...

I've tested myself, if I leave fx open for a long time with firebug
enabled (with network monitor disabled)
I've noticed that memory isn't released even if I try the
"trim_on_minimize" hint...

Anyway, I'll try once more and I'll tell you the results...

However, Mozilla community state "Disable Firebug when not using it"

here:

http://kb.mozillazine.org/Problematic_extensions

John J Barton

unread,
Jul 30, 2007, 4:38:03 PM7/30/07
to Firebug
If you produce a test case I'll fix the leak. But I've said that
before and nothing comes of it.

The Mozilla wiki page refers to a post by Shiraz Dindar which claims
that Firebug takes "excessive CPU". It was not about leaks or Net
tab. (Nor was the claim about CPU backed by evidence).

Disabling Firebug when you are not using it is good advice, but not
relevant. Specifically this advice does not derive from evidence that
there is a memory leak.

I am making a point of answering these posts in detail because the
cumulative effect of multiple posts about a memory leak is people
assume it is true. If it is true let's fix it; if not then let's stop
talking about it.

John.

patrickdrd

unread,
Jul 30, 2007, 5:09:27 PM7/30/07
to Firebug
well, ok, you're right!

go ahead and try the following case:

1) start fx with firebug enabled (disable network monitoring) and add
the config.trim_on_minimize=true tweak in about.config,
open 4 or 5 pages, mimimize fx (that's where trim_on_minimize takes
effect releasing all of fx's memory),
maximize fx after 1-2 secs, and refresh one or two pages,
you'll see that fx's used mem goes up to 70 mb (at least for me)

2) disable firebug totally (from the addons option) and do the above,
you'll see that fx's mem stays at 50 mb!

So, I guess that firebug is occupying some memory space that never
releases!

John J Barton

unread,
Jul 30, 2007, 6:47:24 PM7/30/07
to Firebug
Did you mean: open 4 or 5 pages then close them? If they remain open,
then firebug will of course have memory for them.
John.

patrickdrd

unread,
Jul 30, 2007, 6:55:44 PM7/30/07
to Firebug
no, let them remain open,
the problem is that firebug keeps memory for them,
even if it is disabled (tools -> firebug -> disable firebug)!

John J Barton

unread,
Jul 30, 2007, 7:01:07 PM7/30/07
to Firebug
BTW according to http://kb.mozillazine.org/Config.trim_on_minimize,
the configuration setting trim_on_minimize simply allows Windows to
page more Firefox memory to disk. Setting this true will most likely
make Firefox run poorly and (assuming the article is correct) it will
not "release memory".

One way to demonstrate Firebug leaks is with Baron's leak detector:
https://addons.mozilla.org/firefox/2490/
http://dbaron.org/mozilla/leak-monitor/

Another way would be a specific web page that took more and more
memory every time it was reloaded.

Another way would be a specific web page that took a lot of memory and
that memory did not go away when the page was closed.

On Jul 30, 2:09 pm, patrickdrd <patrick...@gmail.com> wrote:

John J Barton

unread,
Jul 30, 2007, 7:19:35 PM7/30/07
to Firebug
Now we are getting somewhere. Yes, Firebug takes some extra memory per
page when enabled and even some when "disabled". The "disabled" is
short hand for "not active on this page". Firebug can be instantly
active for any page, but to do that it has to compare each page URI
with its list of allowed URIs. That code and its storage take up a
bit of time and space. As far as I know that time and space is
insignificant.

A fixed overhead per page is not a memory leak. It could still be a
problem if, for example, you think the overhead is significant. Your
numbers were 5 pages gave 50Mb without Firebug and 70MB with. So the
overhead would be 5Mb/page on a page with 10Mb content. Assuming that
in your test Firebug was enabled (as you said in your description)
this is what I would expect, depending upon which panels you had
open. After all Firebug can in principle shows all of the HTML and
all of the DOM, so its memory should be at least twice that normal
page content. This however is just justification, I don't have any
measurements of memory for Firebug.

John.

patrickdrd

unread,
Jul 31, 2007, 3:18:49 AM7/31/07
to Firebug
Anyway, I called a "memory leak" the fact that
I have firebug inactive for all pages and that continues to eat up my
memory!

This was the reason I disabled it totally
(from addons window)

and sth else:
I don't think that you can find pages with 10 mb content,
the pages I load are simple pages (plain text mostly)

John J Barton

unread,
Jul 31, 2007, 12:07:09 PM7/31/07
to Firebug
I can only go by the information that you give me. Your example had
firebug active. Your example used 50MB for 5 pages without Firebug.
When I divide I get 10Mb/page on average. With Firebug your example
used 70MB. (70-50)/5 is 4MB. 40% overhead for a tool like Firebug is
great. I don't understand what you are concerned about.

I am open to any proposal you have for tracking down and fixing
significant problems in Firebug.

John.

patrickdrd

unread,
Jul 31, 2007, 5:53:02 PM7/31/07
to Firebug
well, ok, but the problem is,
how am I (and some other users using firebug for web development)
supposed to release that amount of memory?

fx is intended to be used as a browser, not only for web development,
so, what should I do?

restart fx after some time and every time I use firebug?

(I'm one of the users that leave their browser open for a very long
time a day)

avp

unread,
Aug 3, 2007, 3:42:28 AM8/3/07
to Firebug

Same problem here. Firefox mem usage bloating up after day or two. I
was really going to post some negative comments about mem holes in
either firefox or firebug. Then again, I couldn't really point the
situation where the leak happens. Then I came up with a different
idea. The firebug overhead mem usage is really not that bad, unless
you have constantly 10+ tabs open. So, stripped the Firefox usage to
webdev only and moved all other browsing to Opera. Since that day, no
problems. It's annoying at first and next to impossible for some, but
works for me.

Just an ideological change to classify FF as a development tool and
use something else for "regular" browsing. Maybe there's a way to have
two separate installs of firefox running for the similar effect..
without the need to switch to other browser..

and btw: moving 95% of browsing to Opera was 100 times easier that it
would be to give up using firebug...

patrickdrd

unread,
Aug 3, 2007, 7:14:33 PM8/3/07
to Firebug
I've tried sth else,

disable firebug from the addons list and enable it only when I need
it,
because it is a memory hog

jsawers

unread,
Aug 24, 2007, 4:16:33 PM8/24/07
to Firebug
I do the same exact thing. I have two copies of Firefox installed, and
two profiles set up "Default" with no firebug and "Development", in
the default profile, I have about 50 tabs open, and in dev, I have
about 3, that way Firebug doesn't offer any overhead on all my other
browsing. It also helps if I find a bug that managed to crash my
browser, I don't have to worry about reloading all those tabs or
restarting FF when a new plugin version is released.

That said, I have noticed that my "dev" copy of FF slows down
noticeably over a week of heavy development. It gets to the point that
it takes over a second for input elements like drop-downs and text
areas to respond to clicks and key events. Restarting fixes it.

Now, I can't say that Firebug causes it, there isn't any way for me to
do a week of development with firebug disabled (talk about useful!) to
see if the problem still appears. Also, I have a lot of other plugins.
If I ever have enough tree time to try and weed out the culprit, I'll
post.

Reply all
Reply to author
Forward
0 new messages