Slashdot Mirror


Firefox Working to Fix Memory Leaks

Christopher Blanc writes "Many Mozilla community members, including both volunteers and Mozilla Corporation employees, have been helping to reduce Firefox's memory usage and fix memory leak bugs lately. Hopefully, the result of this effort will be that Firefox 3 uses less memory than Firefox 2 did, especially after it has been used for several hours." Here's hoping. Frequent restarts of things on my computer make me furious. I can't imagine why anyone would tolerate such things.

11 of 555 comments (clear)

  1. Restarting Isn't much of a problem by Gertlex · · Score: 4, Informative

    Here's hoping. Frequent restarts of things on my computer make me furious. I can't imagine why anyone would tolerate such things.

    I tolerate it with an extension that provides a restart button on the toolbar. There are several such extensions. It's also useful for when one wants to quickly restart after installing/enabling/disabling an add-on/theme.

    And of course, said extensions reload Firefox with the windows/tabs you had open.
  2. Re:Symmetry by Anonymous Coward · · Score: 3, Informative

    LOL, maybe if you're working in a purely functional programming language :P if that were really the case, you could allocate everything on the stack. In practice, it's often necessary to keep stuff around in dynamically allocated memory between function calls, which is why we have the heap.

  3. Re:C++ long-in-the-tooth? by Constantine+XVI · · Score: 3, Informative

    Sorry, but quite a few other browsers (Opera, Konqueror, Safari(the WebKit part anyways)) are written in C++, and they don't seem to have near the problems Firefox has.

    --
    "I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
  4. Because YOU allow it! by www.sorehands.com · · Score: 3, Informative

    It is because people accept poor programming as the norm. Oh, yeah, just reboot it and it'll be fine.

    I consult for someone who uses ACT! 2005. When they got the upgrade notice, they asked me to check it out. I spoke to ACT! support and they told me "We improved performance by releasing resources that we are no longer using." I said, "THAT IS A BUG FIX!" Anybody writing code outside of school should be doing it, and if I was grading their code, I would take points off for that.

    I'd like to see some of these software companies that do this get sued for such poor coding practices.

  5. Re:C++ long-in-the-tooth? by jsebrech · · Score: 5, Informative

    XUL is inherently single-threaded and JavaScript based. Try out any XUL application out there and you'll see how you get the same poor performance, speed and resource usage as with Firefox (try Miro Player and Joost). ...

    Actually I'm pretty sure they're in denial as to the cause of their problems. Announcing they're working on fixing "memory leaks" just supports their ability to continue their delusion.


    They're not in denial. They're working on tamarin, a replacement/upgrade of their javascript engine based on the same engine that's in flash 9 / actionscript 3.

    Tamarin will run javascript 2, which will to do javascript what the move from actionscript 2 to 3 did for flash/flex. In short: it will make non-toy applications easily done, instead of just marginally feasible. They plan to migrate the firefox UI and extensions to javascript 2, which should negate the performance issues. Only problem: it won't be ready for FF3.

  6. Re:You're already tolerating it by using it at all by jsebrech · · Score: 3, Informative

    Today, FF has morphed in to something which can't be used, with plugins, for more than a couple days max without needing to be reset.

    You say that, and you compare it to IE. The only environment where I know people keep a firefox process open for days is on the mac, which doesn't run IE anymore (and btw, safari 2 leaks like a sieve too in my experience). Yes, I have to relaunch ff on my mac every few days. But on windows every time I close my last window, the browser shuts down and all memory is reclaimed. So, on platforms that are not mac, and for "normal" use patterns (i.e. don't leave a browser window with sites open for days), this is a non-issue.

    Thiis page may be informative about the issue of memory in firefox: http://plugindoc.mozdev.org/faqs/memusage.html

  7. Firefox memory leaks - (X11 specific) by Alien+Being · · Score: 5, Informative

    The biggest memory leak does not show up in firefox itself. It shows up in the X process:

                TIME+ PID USER CODE VIRT SWAP RES SHR S %CPU %MEM P COMMAND
          391:42.00 30262 root 1712 864m 481m 383m 5636 R 20.5 38.0 0 X :0 -auth /home/me/.serverauth.30245
            19:54.97 5473 me 9.9m 350m 202m 148m 18m S 0.0 14.7 0 firefox/firefox-bin

    xrestop shows this:

          res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier

          3600000 295 62 1 2664 119 621592K 12K 621604K ? Firefox Working to Fix Memory Leaks - Mozilla Firefox

    In other words, X has over 600MB of memory holding pixmaps for firefox. This grows every time I open a page/tab with images in it.

    Closing pages/tabs does not free the memory from X, nor does lowering firefox's various cache settings in the preferences dialog and about:config. Quiting firefox causes X to release the memory. I have to do this at least once a week.

  8. The memory bug is also a CPU hogging bug. by Futurepower(R) · · Score: 5, Informative

    What people call the memory gobbling bug is actually also a CPU hogging bug, and it is still present in Firefox version 2.0.0.7, even though the bug was reported perhaps 5 years ago. Versions 2.0.0.7 and 2.0.0.6 are far more stable than previous versions, but Firefox is still the most unstable program in common use.

    The CPU hogging bug in Firefox may be caused by inadequate allocation of resources. Maybe the chaining of the event handler code with numerous windows open is an issue.

    Firefox crashes Microsoft Windows. Apparently there is a bug in Windows, or more than one, that causes the entire Microsoft Windows OS to become unstable when Firefox starts CPU hogging. In any case, the only way to get Windows back to a stable state after killing Firefox is to re-start the computer.

    It's interesting that Firefox can be used to show that Windows is an unstable OS, in some cases. Linux is completely stable; it is only necessary to kill Firefox to regain resources.

    The Firefox CPU hogging bug occurs only during heavy use of Firefox, with many Windows and tabs open for several hours, such as happens when someone in purchasing in a corporate environment is researching computer parts. The problem is made worse if the computer is hibernated or put in standby.

    If you open a lot of windows and tabs in Firefox on a laptop, and put the laptop in and out of standby, you will eventually notice that the laptop fan is running all the time, even when there is no activity. That's the CPU bug, and it can potentially shorten the life of your laptop. The fan is often the laptop component that fails first.

    It is interesting to note that the latest version of Opera also exhibits CPU hogging, but much less frequently. However, using Opera is not as comfortable because of poor design decisions in Opera.

    See: Firefox is the most unstable program in common use.

    Firefox developers apparently game the system by abusing those who report bugs: Mozilla Foundation Top 20 Excuses for Not Fixing Firefox Bugs.

    Firefox development sometimes resembles playing.

    Basically, this seems to be the underlying problem: Winifred Mitchell Baker, the CEO of Mozilla, is a socially uncomfortable lawyer who became CEO when no one thought there was an opportunity. Now Mozilla Foundation is making millions from designating Google as the default search engine.

    Winifred has insufficient control over those who work for her, because she doesn't understand what they do. The Firefox CPU hogging and memory gobbling bug would take some serious troubleshooting to find, and no one wants to do the work, apparently.

    1. Re:The memory bug is also a CPU hogging bug. by colfer · · Score: 3, Informative

      Some valid points, but FF has a fix for the Hibernate bug, maybe more fixes coming, see Bug 213637 and its friends. That fix will be in 2.0.0.8, while 2.0.0.7 was an emergency release for the "Quicktime abuses Firefox command line parameters" vulnerability.

  9. Automatically != Efficiently by ClosedSource · · Score: 4, Informative

    A well-written C++ program is going to free memory much faster than a GC can. The value of GC is that you don't have to worry about forgetting to free memory, it will happen - eventually.

  10. Evidence of denial. by Futurepower(R) · · Score: 3, Informative

    "They're not in denial."

    Maybe Mozilla people are not in denial about that one technical issue, but they certainly have been about others. See Mozilla Foundation Top 20 Excuses for Not Fixing Firefox Bugs, posted to the story 611 Defects, 71 Vulnerabilities Found In Firefox.

    Since that Slashdot story, many many memory leaks have been found in Firefox which have made it much more stable. But Firefox is STILL the most unstable program in common use.