Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Firefox Working to Fix Memory Leaks

CmdrTaco posted about 7 years ago | from the important-but-boring-work dept.

Mozilla 555

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.

cancel ×

555 comments

Sorry! There are no comments related to the filter you selected.

about time! (4, Insightful)

downix (84795) | about 7 years ago | (#20730379)

Too many apps nowadays just throw out RAM like it was yesterdays newspaper! It is sloppy coding, and I'm tired of having to put 2GB of RAM into a system just to surf the net nowadays.

Re:about time! (4, Informative)

tritonman (998572) | about 7 years ago | (#20730405)

Half the time when I start having memory problems on my PC, I look at firefox (which is just has one tab open with yahoo mail) and it is using like 400 megs of RAM.

C++ long-in-the-tooth? (0)

Tablizer (95088) | about 7 years ago | (#20730509)

Perhaps the culprit is C++. Languages with auto-garbage-collection or are database-engine-based tend to clean up automatically or cache to disk more effectively. C/C++ just seems to have so many low-level crevices to accidently mess up with.

Re:C++ long-in-the-tooth? (2, Insightful)

deftcoder (1090261) | about 7 years ago | (#20730529)

The culprit is poor programming.

If you can't code without hand-holding tools like automatic garbage collection, perhaps you belong in a different profession!

Re:C++ long-in-the-tooth? (4, Funny)

ObsessiveMathsFreak (773371) | about 7 years ago | (#20730671)

If you can't code without hand-holding tools like automatic garbage collection, perhaps you belong in a different profession!
Professional computer programming, for example.

Re:C++ long-in-the-tooth? (4, Insightful)

SilentChris (452960) | about 7 years ago | (#20730685)

If you can't code without hand-holding tools like automatic garbage collection, perhaps you belong in a different profession!


Or perhaps they're too busy thinking about clearly-defined objects, robust interfaces, clean documentation and the "big picture" then to worry about moving individual bytes around.

Likewise, I don't trust any artist using Flash today. They should clearly know how to code, in assembly, animation and transitions. Use of a timeline is for losers. The creative process should always be sacrificed for knowing the code inside out. /sarcasmoff

Re:C++ long-in-the-tooth? (3, Insightful)

caerwyn (38056) | about 7 years ago | (#20730797)

Or perhaps they're too busy thinking about clearly-defined objects, robust interfaces, clean documentation and the "big picture" then to worry about moving individual bytes around.

Actually, I'd say they're not busy enough- if they actually had been, proper memory management should simply fall into place on top of a clean architecture. If you're trying to shoehorn memory management back into something that didn't support it before, you're going to have issues- and this applies whether you're doing c/c++ style management, reference counting, or garbage collecting.

Re:C++ long-in-the-tooth? (4, Insightful)

Kristoph (242780) | about 7 years ago | (#20730883)

A computer, by definition, 'moves bytes around'. One might argue that this is the job of the computer (or language or VM or whatever) and not programmer but if you don't understand how / why and when the bytes are moved around then you are a poorer programmer for it.

C++ yields superior performance and memory usage, than higher level languages, in the hands of a skilled C++ programmer and it can lead to bloatware in the hands of a novice.

There is this old saying about blaming your tools for a poor job and it applies to software development too.

]{

Re:C++ long-in-the-tooth? (1)

gcauthon (714964) | about 7 years ago | (#20730891)

As a programmer, it is your job to think about both aspects. Anyone can think about the "big picture" after spending a year or two at ITT Tech. Real programmers make the big bucks because they can translate that "big picture" into an algorithm that "moves individual bytes around". Good programmers make even more money if they can do this without crashing the system or running it low on memory while following a strict time schedule.

Re:C++ long-in-the-tooth? (5, Interesting)

suv4x4 (956391) | about 7 years ago | (#20730691)

If you can't code without hand-holding tools like automatic garbage collection, perhaps you belong in a different profession!

Firefox's problem is architectural and not one of garbage collection.

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).

The Firefox developers are literally throwing out more C code with every release, replacing it with JavaScript code.

Leaks (in the classical sense) aren't what's causing Firefox's abysmal performance, and this is why Firefox 2 performs worse than Firefox 1.5, despite one of the "features" of Firefox 2 was supposedly plenty of fixed memory leaks.

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.

Re:C++ long-in-the-tooth? (1)

SheldonYoung (25077) | about 7 years ago | (#20730705)

Your argument is nonsense. If what you said held true, large scale applications should be able to be written is assembler. Without high level tools it wouldn't be feasible to create applications the scale we do today.

Re:C++ long-in-the-tooth? (1)

Kristoph (242780) | about 7 years ago | (#20730977)

I disagree. You can, in fact, write any piece of software in assembler. The obvious advantage is that it would be much smaller and faster than any other solution. The challenge is that this would be time consuming and would require a very skilled team of developers to do correctly. This would, in turn, drive up cost dramatically.

In other words we build software with increasing higher level languages not because it is not possible to build software with lower level languages but because it much cheaper to do so.

]{

Re:C++ long-in-the-tooth? (4, Insightful)

i7dude (473077) | about 7 years ago | (#20731011)


Your argument is nonsense. If what you said held true, large scale applications should be able to be written is assembler. Without high level tools it wouldn't be feasible to create applications the scale we do today.


Wrong. What he is saying is that people who choose to use C/C++ for their applications should be competent enough to properly handle their own allocation and de-allocation of memory. If your abilities as a programmer preclude you from properly managing your application's memory then you need to look at alternatives that will take care of that for you.

There are plenty of languages out there that offer things like garbage collection. Developers need to make better choices about which tools they use to meet their needs, and also understand their limitations and work within those parameters.

dude.

Re:C++ long-in-the-tooth? (1)

TuringTest (533084) | about 7 years ago | (#20730751)

What's so special about memory management that you can't encapsulate it in a dedicated module, and abstract it away in the form of, say, a garbage collector?

Re:C++ long-in-the-tooth? (1)

Rei (128717) | about 7 years ago | (#20730759)

My notion is that if you're finding yourself doing a lot of new/delete statements, it's about time that you considered using smart pointers instead. Why should you have to remember to deallocate memory every last time you outscope some object when you can have the object do it for itself?

Re:C++ long-in-the-tooth? (0)

Anonymous Coward | about 7 years ago | (#20730911)

I think you belong to management. Micro management.

Re:C++ long-in-the-tooth? (0)

Anonymous Coward | about 7 years ago | (#20730733)

That's right. You write crap, so you blame the language. If you can only write good code in Java, maybe you and your buddies should dig ditches for a living. Leave the software to the experts.

Re:C++ long-in-the-tooth? (5, Insightful)

TemporalBeing (803363) | about 7 years ago | (#20730767)

Perhaps the culprit is C++. Languages with auto-garbage-collection or are database-engine-based tend to clean up automatically or cache to disk more effectively.
Actually, the big language culprits would be those with auto-garbage collection, etc. as they tend to have lazier programmers that don't "need" to manage their own resources, and in some cases even prohibit the programmer from being able to manage their resources.

C/C++ and similar languages, on the other hand, force the programmers to manage their resources. In those cases, the programmers would likely be just not designing their programs well, or employing bad resource management. Yes, managing resources can be hard - one project I worked on had to go through several months of testing to get the resources properly managed, and even then some of the resources were still a little uncontrollable due to legacy code or Windows APIs, but overall the thing was pretty stable and any memory leaks were mostly due to Windows APIs.

In either case, I can't tell you how many times I have heard (especially from Java programmers) something along the lines of the following: "RAM is cheap", "processors are getting faster", "computers will be ready for this when we deliver it", "hardware is cheaper than programmers"

No offense, but to rely on hardware always being getting faster, or the cost of adding more RAM always being cheaper, etc. is a bad premise to rely on. Already with multi-core processors we are seeing slower processors being combined into a single processor get the equivalent processing power of a faster processor (e.g. two 1.8 Ghz cores rated equally to a single 3 Ghz core); thus the premise breaks down. Also, I want to be able to do more with the faster processors and additional RAM, rather than simply do the same job I could do yesterday only in "better" software.

The real answer is doing your job right, and using the right tool - which is not necessarily the easiest tool to use either. We also need to get back to writing applications that have good, if not great, performance with minimal resource requirements (e.g. RAM and processor). If we're not going this at the API/library level - at the very least - then the programs and library/APIs that rely on that API/library level will have worse performance no matter what they do. But in either case it doesn't get done unless the programmers do their job, and use tools that allow them to do it.

Re:C++ long-in-the-tooth? (1)

Oswald (235719) | about 7 years ago | (#20730995)

I agree with all of your comments about not wasting computing resources, but I'm not sure they are apropos. Firefox is not written in Java. Firefox is written in C++ [mozilla.org] .

Re:C++ long-in-the-tooth? (1)

Rei (128717) | about 7 years ago | (#20731027)

Amen to that. I get that exact same mantra from Java developers all the time. And, unsurprisingly, amazingly simple programs end up amazingly bloated. Most tomcat apps, especially, are great examples of this.

And another thing about Java: for a "cross-platform language", it really has an awful lot of problems running between different versions of itself. Sun Java or not? 1.4, 1.5, or 1.6? I once even had to use a program that had a compatability issue between 1.4.2_04 and 1.4.2_07! I'm not just talking about forward compatability, but backwards compatability as well, forcing me to keep multiple versions of Java on my system as a consequence. It doesn't give me a very good impression of the language.

If your concern is memory leaks, just use C++ and smart pointers.

Re:C++ long-in-the-tooth? (1)

Yahma (1004476) | about 7 years ago | (#20730843)

A poorly programmed Java application can leak memory too. The culprit is likely not C++; the culprit is more likely poor programming practices or programming errors.

Re:C++ long-in-the-tooth? (1)

tritonman (998572) | about 7 years ago | (#20730983)

so what, they should run firefox in some ungodly slow virtual machine just so they can have shitty programmers who don't know anything about memory allocation?

Re:about time! (0)

Anonymous Coward | about 7 years ago | (#20730609)

Apps do a lot more nowadays than yestercentury's apps. I once had a discussion about a read buffer that I used to speed up network reads. I used a megabyte just for reading in a configuration file, which a colleague found incredibly wasteful. Well, I countered that I could read the file with much less memory, but then it would be slower under some circumstances, and on most systems allocating 1 megabyte for a couple of seconds is simply no problem. I've written whole applications for machines which didn't have enough memory to hold one of today's truecolor icons. It's not a matter of can or can't do. If the machine has enough RAM, it is wasteful to let it go unused if the application can benefit from using more RAM.

Re:about time! (1)

MightyMartian (840721) | about 7 years ago | (#20730673)

Apps do a lot more nowadays than yestercentury's apps. I once had a discussion about a read buffer that I used to speed up network reads. I used a megabyte just for reading in a configuration file, which a colleague found incredibly wasteful. Well, I countered that I could read the file with much less memory, but then it would be slower under some circumstances, and on most systems allocating 1 megabyte for a couple of seconds is simply no problem. I've written whole applications for machines which didn't have enough memory to hold one of today's truecolor icons. It's not a matter of can or can't do. If the machine has enough RAM, it is wasteful to let it go unused if the application can benefit from using more RAM.


Yeah, after all, it's not like there are any other applications running on the computer.

Glad the issue is getting some priority, but .... (2, Interesting)

waterbear (190559) | about 7 years ago | (#20730613)

I completely agree. I only have 384MB on the machine from which I'm writing this. There isn't room on the mb for any more than that. I got totally tired of the system seizing up when I used to use Firefox. So I switched to Opera. That's not completely immune to seize-up/memory concumption problems either. So I'll keep an eye open for significant improvements to FF, and just possibly switch back if they fix the memory bugs.

I hope they won't totally forget the folks using older-specification systems, but I have my worries about the FF debugging process: I looked at the blog that was referenced in the article header, and some of the comments sound ominous for quality. The way some of them read, makes it seem as if patches to force memory-release in various situations are just going to be grafted on top of the buggy code. That looks like a recipe for performance loss, compared with the result of fixing the problems at their root?

-wb-

Re:about time! (1)

DustyShadow (691635) | about 7 years ago | (#20730617)

I consistently open 10-20 tabs in Firefox and it hardly ever gets over 250 MB of RAM use. I think that's acceptable. I have other beefs with Firefox, such as the PDF crash issue (Maybe this is an adobe problem, I don't know.) and other random crashes that have been happening lately. There was just a recent update though so maybe the random crashing will stop.

Bloat in general (5, Insightful)

pipatron (966506) | about 7 years ago | (#20730385)

I don't mind the memory. I have plenty of gigs even in my laptop. What I mind is the general slowness that I experience with Firefox, and that makes me use Opera on my laptop even though I would feel better using an open source browser.

Re:Bloat in general (1)

kc2keo (694222) | about 7 years ago | (#20730577)

I use firefox2.0.0.7 every day in Ubuntu Fiesty Fawn (also in Windows when I game) and have it running with 5 or more tabs at all times i'm using the computer. I also have it set so when I start firefox up all my previous tabs open up. Sometimes I get a browser crash.

However... when I used Firefox1x I noticed everything was snappier. With firefox 2x I felt my browsing experience was getting sluggish with the new Firefox series. I am all for a more efficient browsing experience. A faster browsing experience is very important for users just trying out the browser.

Thats just my 2 cents... I know my grammer sucks and this will never get modded insightful.... :-(

Re:Bloat in general (0)

Anonymous Coward | about 7 years ago | (#20730745)

your spelling also sucks if its any consolation.

And on three... (0, Redundant)

onetwentyone (882404) | about 7 years ago | (#20730387)

Cue it's not a bug it's a feature. GO!

Re:And on three... (5, Funny)

Selfbain (624722) | about 7 years ago | (#20730473)

Ok. [flickr.com]

Re:And on three... (1)

moore.dustin (942289) | about 7 years ago | (#20730495)

Actually... [slashdot.org] it kinda is :)

This is long overdue and is the cause of my biggest gripe with Firefox. Without a couple vital extensions related to my work, I would have ditched FF for IE7 because of this issue. I absolutely hate having to Force quit the .exe in order to save my session tabs and free up the memory. Every single machine I use (3 desktops, 1 laptop) has to be forced down on a nearly daily basis if not more, in order to keep the memory available for other applications.

Re:And on three... (1)

Burpmaster (598437) | about 7 years ago | (#20730715)

I absolutely hate having to Force quit the .exe in order to save my session tabs and free up the memory.

On that note, Firefox 3 now asks if you want to save your session when you choose quit out of the file menu, or when you close the last window with multiple tabs open.

Re:And on three... (5, Interesting)

Seumas (6865) | about 7 years ago | (#20730525)

Actually, from what I understood over the last year "THERE IS NO MEMORY PROBLEM".

Every time someone mentions memory issues, the responses are either that it's supposed to consume a gigabyte of ram so that it speeds up the back button or that "there is no memory issue".

Strange, now, that there are suddenly people paying attention to specifically attacking memory use issues that supposedly don't exist.

Re:And on three... (2, Funny)

morgan_greywolf (835522) | about 7 years ago | (#20730837)

Actually, from what I understood over the last year "THERE IS NO MEMORY PROBLEM".

Every time someone mentions memory issues, the responses are either that it's supposed to consume a gigabyte of ram so that it speeds up the back button or that "there is no memory issue".
This technique seems to be working for Microsoft. "THERE ARE NO MORE SECURITY PROBLEMS IN WINDOWS." Hey, maybe that's what the Microsoft developers visiting with the Mozilla developers last year was all about...

Here we go... (0)

Anonymous Coward | about 7 years ago | (#20730391)

The bulk of the complaints about Firefox being a memory hog are due to features which simply need a lot of memory, not due to memory leaks (bugs). While it's certainly a good idea to check for, find and close memory leaks, the significance of this effort will not reduce the normal memory usage drastically. Firefox simply does things which require a lot of memory.

Re:Here we go... (0)

Anonymous Coward | about 7 years ago | (#20730489)

My work stuff is web based. I start Firefox 1.5, and it starts out with 40-60MB memory used. No big deal.

By 4-6 hours in, it's at 90MB. After 3-4 days, it gets up to 600-700MB, and I have to close it.

I have adblock (not plus), and the "brushed" theme, and that's it for addons, and I keep three frames open (CNN, /., the server I work on), and occasionally open/close a couple of more.

I think there is probably a memory leak in there with that setup, and the expanding memory useage.

Admittedly, its not the latest firefox, but 2.0 doesn't work with the HTML/Javascript that the server produces.

Re:Here we go... (4, Insightful)

savuporo (658486) | about 7 years ago | (#20730501)

There are very few "things that require a lot of memory", really. Most of the "things" you do in programming are tradeoffs, often between complexity of implementation, speed and memory requirements. There are usually off the shelf algorithms for each approach. Simplest solutions are often the most inefficient ones.
There is no reason why a minimal web browser could not be implemented, utilizing something like ~100kb of memory, in fact, i have seen the code to one. However, it wont be a) fast b) portable c) full featured d) very easy to understand

Re:Here we go... (1)

HarvardAce (771954) | about 7 years ago | (#20730739)

However, it wont be a) fast b) portable c) full featured d) very easy to understand
e) good

Re:Here we go... (1)

_14k4 (5085) | about 7 years ago | (#20730787)

I agree. In reality, who needs a "full featured" browser, and when/where do they need it. At home, if I'm surfing around the various "portal" sites I use to collect my information (google.com/ig for instance), I could deal with a minimal browser. In fact, I may go look around for something pretty lean when I get home tonight.

However, here at work, I am frequently sent off to various vendor sites and need a "full" browser that is able to process flash, java script, etc...

Re:Here we go... (1)

moderatorrater (1095745) | about 7 years ago | (#20730847)

That's a bullshit excuse they've thrown around for a while, and it's simply not true. You can turn the memory usage on those features down and firefox still slowly creeps up to using as much memory as it can, and this is without any addons whatsoever. So, either firefox ignores configuration settings or it's a memory leak.

Yay! (1)

benmatth (1160859) | about 7 years ago | (#20730393)

This is what has been keeping me off Firefox on my memory-lacking iBook.

Re:Yay! (1)

Generic Guy (678542) | about 7 years ago | (#20730663)

This is what has been keeping me off Firefox on my memory-lacking iBook.

Maybe when they finally fix the memory bug, perhaps they'll begin fixing the Copy-Paste clipboard bug. Or should I say, the not Copy-Paste bug. It is especially bad on my intel iMac. (Opening New windows instead of tabs exposes the problem particularly well.)

I like Firefox, but these ongoing years-long problems make you difficult to recommend!

That's good news (0)

Anonymous Coward | about 7 years ago | (#20730397)

I'm tired of Firefox being like a cartoon snowball rolling downhill: once the little bugger gets going, it just gets bigger and bigger until it becomes an unstoppable memory eating monster.

but but (4, Interesting)

svendsen (1029716) | about 7 years ago | (#20730399)

everytime I mentioned the memory issue I was always told it was a plugin or there was something wrong with my system or something about my mother and a donkey. Certainly firefox fan boys wouldn't have just attacked me because I questioned something...would they? :-D

Re:but but (0)

Anonymous Coward | about 7 years ago | (#20730535)

Of course there are memory leaks. It's a big program, there always have been and always will be memory leaks. Of course, working on closing memory leaks isn't something new. And yea, plugins are and have been the biggest cause of serious memory leaks. That and leaving firefox open for weeks on end while opening and closing hundreds of tabs, on some systems, it seems.

I, and most people who use firefox, never have issues with memory leaks.

Re:but but (2, Funny)

onetwentyone (882404) | about 7 years ago | (#20730541)

Could be worse, you could have questioned Firefox's memory handling on a Beowulf cluster of Linux boxes conveniently cooled with a hobby-built liquid nitrogen heat exchange.

Re:but but (1)

Martin Blank (154261) | about 7 years ago | (#20730637)

Exactly my thoughts. I'm constantly told things like, "There's no memory leak! It's a feature to help you undo closed tabs!" When my memory usage routinely passes 250MB with an average of only 4-6 tabs open through a session (with many tabs being closed along the way), it's not a feature. It shouldn't be remembering 12 tabs past.

Or they blame my "extensive" list of plugins, even when on one system I have only about a dozen total, most of them minor functionality enhancements like Copy Plain Text and PDF Download.

Memory utilization hasn't gotten any worse from the later stages of 1.x, but it certainly hasn't gotten much better. It's really hard to convince people of the superiority of Firefox when they see those kind of performance numbers.

Re:but but (4, Interesting)

MBCook (132727) | about 7 years ago | (#20730659)

I've heard that too. I use FF on my desktop at work with one or two plugins (FlashBlock and FireBug, mostly). It does leak memory after enough time. Closing the browser always fixes it, so it's not much of a problem.

That said, if a plugin leaks memory, there are a few options. First, the system should know. Even if the plugin in used constantly, I should be able to open the extensions options panel and see how much memory each one is using, so I can identify the culprit. There should be a warning system ("Plug-in 'MemHog2' is using 500MB of ram, close/ignore/disable?").

Also, when a plugin isn't in use, then it shouldn't cause a problem. Let's say that the problem is Flashblock. If it isn't actively rendering (say I only have one window/tab open and it's pure text, no flash/etc) then it really shouldn't be using any memory. If I have FireBug inactive it should use next to no memory (when I have it actively checked CSS/JS/etc I expect it to use memory).

I'm glad they are working on this. I've heard this complaint for a while. But even if the problem is the plugins, it needs fixing or roping in.

How about being able to set memory limits for plug-ins, Mac OS 1-9.x style? Maybe total, maybe per active page, maybe both. Just a random idea.

Re:but but (0)

Anonymous Coward | about 7 years ago | (#20730727)

It's OpenSource®

Kwitcherbitchen, fix the leaks, and send the fixes back.

Firefox != Internet (5, Insightful)

realdodgeman (1113225) | about 7 years ago | (#20730407)

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


Nobody forces you to use Firefox. You can use Opera, Konqueror, links or IE, or any other browser out there...

Re:Firefox != Internet (0)

Anonymous Coward | about 7 years ago | (#20730551)

restarts make Hulk mad!!! grrrrrrrrrrrrr

STFU and deal, nancy

Re:Firefox != Internet (1)

the_humeister (922869) | about 7 years ago | (#20730611)

What??? You suggested IE over Firefox? I'm surprised you weren't modded down to "-20 Microsoft shill"...

Re:Firefox != Internet (1)

realdodgeman (1113225) | about 7 years ago | (#20730885)

Look at the order... I suggested Opera, Konqueror and even links over IE. But I use Firefox myself, and I think it is the best browser despite of it's memory leaks. I just wanted to point out that Firefox is not alone. If you don't like it, find something else, or stop complaining.

Re:Firefox != Internet (1)

JimNTonik (1097185) | about 7 years ago | (#20730653)

Unfortunately many people do That said, it's getting better each revision. I just wanted to point out that in some situations it's the only "officially supported" choice.

X != Y Posts Considered Harmful (0)

Anonymous Coward | about 7 years ago | (#20730795)

There, two clichés in one post. I'm so sick of these...

Re:Firefox != Internet (0)

Anonymous Coward | about 7 years ago | (#20730827)

>>Nobody forces you to use Firefox.

SLASHDOT and all the fanboys force me to use Firefox. I am not even a Nerd, much less a Geek if I use IE. Just trying to protect my manhood here.

Well, other than the memory issue, I do like it.

But I do have an old copy of Mosaic laying around..........

crabbyoldguy

Re:Firefox != Internet (3, Interesting)

suv4x4 (956391) | about 7 years ago | (#20730833)

Nobody forces you to use Firefox. You can use Opera, Konqueror, links or IE, or any other browser out there...

Firefox was supposed to be able to withstand popularity, unlike IE. Look at it now: people say it's slow, RAM hog, and hackers have started attacking it successfully just as much as IE.

At least we see it for what it is: the stick in Microsoft's eye that made them resume IE development.

FireFox == Internet (2, Interesting)

Frosty Piss (770223) | about 7 years ago | (#20730935)

Nobody forces you to use Firefox. You can use Opera, Konqueror, links or IE, or any other browser out there...

Maybe not, but in the Windows World, Opera is not a viable alternative to many people who find the Opera UI to be excessively daunting for casual use.

The thing that has irritated me about this is that for a very long time, the FireFox leadership has insisted that there where no memory issues, that it was a specific type of use profile, and that if you knew the secrets of how to tweek the configuration file, performance would improve. This is the lamest of excuses.

FireFox is not sold as some kind of "leet" hacker browser, it's sold as a browser for the people. FireFox leadership needs to be more responsive to the feedback from "AVERAGE" users if they want FireFox to be a major player in the browser world. 10% is nice, but it's still only 10%.

too litlle too late (2, Insightful)

wwmedia (950346) | about 7 years ago | (#20730411)

too little too late some people i know have switched to alternatives like Opera or back to IE7 (both use substantially less resources on windows) due to all that ram hogging

Re:too litlle too late (3, Insightful)

IndustrialComplex (975015) | about 7 years ago | (#20730477)

You know they messed up bigtime when people would opt to go back to IE.

Re:too litlle too late (1)

wwmedia (950346) | about 7 years ago | (#20730661)

well when a laptop has fuck all ram, and Firefox use 120MB ram to open 1 page and IE7 uses 4MB ram to render same page, something is messed up

Re:too litlle too late (1)

MyLongNickName (822545) | about 7 years ago | (#20730683)

You laugh, but for flash based gaming I prefer internet explorer. Now I know that isn't truly a FireFox issue, but it is the only reason I ever launch ie.

Re:too litlle too late (1)

IndustrialComplex (975015) | about 7 years ago | (#20730839)

If only I was laughing. I've seen firefox go over 120Mb of ram on regular occasions. I HAVE to close it if I plan on doing anything else on my laptop. Often I'm running another program that is sucking down 250-300 mb of ram so tacking on an additional 120 really isn't acceptable.

I've thought about stripping out the extentions to see if any of that helps, but it doesn't appear from this thread that they are the real issues. And if I were to strip out all the extras that I like, and end up with a browser that is slower and uses more ram than IE, why not use IE?

I'll probably check out Opera this weekend. Does anyone have any suggestions other than IE?

Re:too litlle too late (1)

realdodgeman (1113225) | about 7 years ago | (#20730927)

too little too late some people i know have switched to alternatives like Opera or back to IE7 (both use substantially less resources on windows) due to all that ram hogging
Firefox is still growing. Therefore it is not too little to late, but exactly what it needs, just on time.

Try Opera (0, Informative)

Anonymous Coward | about 7 years ago | (#20730417)

It runs well on your cellphone, Nintendo Wii/DS and pretty much anything else with a screen & network connection, So I think it's safe to assume it will work on your desktop.

Symmetry (1, Interesting)

Harmonious Botch (921977) | about 7 years ago | (#20730419)

Are there really any memory problems that cannot be cured by strict adherance to the rule of "allocate memory at the beginging of a routine, deallocate same amount at the end"?

Re:Symmetry (4, Funny)

Zelos (1050172) | about 7 years ago | (#20730465)

No, and there are no bugs that can't be prevented by writing perfect, correct code.

I think the problem's in the details...

Re:Symmetry (3, Informative)

Anonymous Coward | about 7 years ago | (#20730537)

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.

Re:Symmetry (4, Funny)

ucblockhead (63650) | about 7 years ago | (#20730555)

Well, yeah. And you could prevent any memory leaks at all by requiring that malloc never be used and that everything be placed in static memory.

Kinda hard to code like that, though.

Re:Symmetry (0)

Anonymous Coward | about 7 years ago | (#20730587)

As I understand, much of the memory issues aren't really leaks (though I'm sure there are some) and more to do with overly agressive page caching.

That said, I've noticed the version of Firefox that comes with Fedora Core 7 (2.?) doesn't seem to have this problem any more. My work machine still runs Firefox 1.5, and I have to restart the browser every couple of days. But my home machine has been up for weeks with way to many tabs open and no problems. Well, no problems after I ditched the crappy Gnu flash plugin which quickly ate all of my memory and crashed KDE.

One thing I would like to figure out - how to get rid of the missing plugin reminder bar? I ditched the Gnu flah plugin. I really don't care to have a flash plugin at all. But firefox pops up this bar at the top of every page with flash telling me I don't have the right plugins installed. Yes, I know - that's by design! How do I get it to shut up about it??

Re:Symmetry (2, Informative)

iabervon (1971) | about 7 years ago | (#20730769)

The easiest way is to get the flashblock extension and some flash plugin, and never click on a flash thing. There's also some way to make a plugin registered for flash that does nothing.

Re:Symmetry (1)

frantzdb (22281) | about 7 years ago | (#20730633)

First, if that is your memory model, you should be using RAII [wikipedia.org] tools like auto_ptr [wikipedia.org] . Second, unfortunately, there are times when memory usage is more complicated. For example, when there are multiple views of the same object and that object should be deleted only when the views all disappear. I haven't looked into Firefox, but in general, I almost never trust myself with delete; it's too easy to leak memory. Even without garbage collection, you can go a long way with various smart pointers.

Re:Symmetry (2, Informative)

TemporalBeing (803363) | about 7 years ago | (#20730965)

Are there really any memory problems that cannot be cured by strict adherance to the rule of "allocate memory at the beginging of a routine, deallocate same amount at the end"?
This would be better states as: "allocate memory when needed and dellocate when no longer required" - memory allocations/dellocations do not always occur in the same routine, and this only gets worse in OO programming. However, garbage-collection does not resolve the issue either. The real answer is smart design and smart programming - and by smart programming I am not talking about garbage-collectors, etc. done for the programmer, I am talking about programmers programming smartly so that their programs manage their resources properly and efficiently.

Which brings my second point - even with your original version, this cannot always be done in some languages as some languages remove the ability to free resources. For example, so far as I am aware - and so far as I can tell - Java cannot free memory resources outside of the garbage collector [sun.com] . So much for a programmer being able to manage their resources properly - this is probably also one of the big reasons Java sucks at performance.

here we go again (1)

krod4 (516423) | about 7 years ago | (#20730439)

line up the fanbois that refuse there can be anything wrong with firefox and memory consumption... for years people have asked what the hell is up with memory usage, and for years the same stubborn people has refused any problems..

It's enough to make anyone consider using IE... (0, Redundant)

xxxJonBoyxxx (565205) | about 7 years ago | (#20730447)

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

I know. It's enough to make anyone consider using IE...

Re:It's enough to make anyone consider using IE... (1)

just_another_sean (919159) | about 7 years ago | (#20730621)

Whoa, let's not go crazy here!

Sir... Sir.... SIR! Put down the mouse and back away from the browser!

Re:It's enough to make anyone consider using IE... (1)

mother_reincarnated (1099781) | about 7 years ago | (#20730793)

I use a browser launched VPN client. And I in fact always have IE open for that and Firefox open for use as a web browser.... I have to restart Firefox at least twice a day to keep memory utilization reasonable and it's a pain to have to reauth. I really don't care *what* causes such horrible memory leaks (but it must be either Live HTTP Headers or Web Developer in my case) but the thing sucks up 350-500mb after a few hours of use.

Restart your *computer*? (0)

revscat (35618) | about 7 years ago | (#20730451)

Frequent restarts of things on my computer make me furious

Shit Taco, what OS are you using? FF leaks on my OS X box too over time, but quitting the app seems to free up the memory.

Or maybe I'm not paying close enough attention.

Re:Restart your *computer*? (1)

EvanED (569694) | about 7 years ago | (#20730565)

Who said restarting the computer? What do you call quitting FF then opening it again?

Re:Restart your *computer*? (1)

mrchaotica (681592) | about 7 years ago | (#20730597)

On my Mac, if I leave it running with Firefox open for a few days I eventually have to restart it -- the whole computer, not just the program -- because it runs completely out of disk space. I've got about 1.7GB free normally, but Firefox (at least, I think it's Firefox; I haven't done formal, rigorous tests but I'm reasonably sure) eventually churns through enough virtual memory (even though I have 2GB of RAM), temporary files, or something that it uses up that entire 1.7GB. Quitting Firefox doesn't delete the temporary files; only restarting the computer does.

Re:Restart your *computer*? (0)

Anonymous Coward | about 7 years ago | (#20730779)

What kind of (semi-decent) OS does not free application memory after application is stopped ?
It should always be enough to kill application, rebooting whole computer is like amputating
both legs with out a reason.

Restarting Isn't much of a problem (4, Informative)

Gertlex (722812) | about 7 years ago | (#20730455)

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.

memory leaks (-1, Troll)

Anonymous Coward | about 7 years ago | (#20730463)

Hey CmdrTaco if those memory leaks piss you off so much why don't you fix them? That's the beauty of open source, you mooch!

Surprise search engine choice! (0, Offtopic)

operagost (62405) | about 7 years ago | (#20730483)

Well, at least this project discovered a new way to find pr0n:

Robert Sayre created a script to load random pages and see whether they cause leaks. The random URLs come from the Yahoo directory (biased toward older, top-level pages), del.icio.us (biased toward newer, geeky pages), and AltaVista (biased toward pornography).

You're already tolerating it by using it at all... (4, Insightful)

mgkimsal2 (200677) | about 7 years ago | (#20730499)

I can't imagine why anyone would tolerate such things.

Well, my guess is that you *are* tolerating it, as are millions of others, simply because you're using it (either older versions of IE, or current versions of Firefox). Can't comment on IE7 cause I don't use it much, but IE6 rarely crashed for me. IE3-5.5, almost daily crashes.

5 years ago people people would constantly belittle IE users because it had frequent crashes, and pointed to the 'superior' Mozilla suite. 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. I add the caveat in there about 'with plugins' because I'm not sure I know many people who run a bare-metal Firefox. Most people use one or more extensions. This has been a huge marketing push for FF - "It's lean! Only use what you need! Get rid of 'bloat' - package everything in extensions!"

Putting things in extensions makes the base 'leaner' but has lead to a situation where there's no centralized testing for, or even acknowledgement of, memory leak bugs (and other bugs, but this is the obvious one). I still read comments from people who claim they never have leaks with FF (we'll see some on this thread no doubt). It's not that I don't believe them, but their usage patterns are likely different from mine. I have about 6 plugins that I love to use, and I like to keep my browser going. The idea that MSIE is more "stable" than FF for daily usage should remind people that resting on your laurels is not an option. What cut the mustard 5 years ago isn't gonna cut it any more.

Reality check (3, Insightful)

MMC Monster (602931) | about 7 years ago | (#20730741)

I can't imagine why anyone would tolerate such things.
5 years ago people people would constantly belittle IE users because it had frequent crashes, and pointed to the 'superior' Mozilla suite. 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.
Reality check: Most general users do not leave their browsers open for a couple days. Let alone a couple days max. In fact, I wager that most turn their computers off at the end of the day.

No I don't have a source for my statement. But ask people you know who are not in the tech industry. The one outlier group is Mac users, who don't realize that closing a browser window doesn't take the program out of memory.

Re:Reality check (1)

sholden (12227) | about 7 years ago | (#20730873)

How about everyone who justs flips the screen closed on their laptop when they're done with it?

Re:You're already tolerating it by using it at all (0)

Anonymous Coward | about 7 years ago | (#20730915)

"I still read comments from people who claim they never have leaks with FF (we'll see some on this thread no doubt)."

Here's one. I have 14 extensions running, haven't restarted firefox since yesterday, and have opened and closed a couple hundred tabs. Of course, I usually close firefox at least once a day, which it seems many people here do not. Still, Firefox is using 72 MB of memory, on a 2 GB system. After restarting, 67 MB. This is with 8 tabs open, 3 of which are mildly image intensive. What horrible leaks! But seriously, I've never seen firefox go over 100 MB or so no matter how much I abused it.

Excellent point about the problem with managing features in extensions, though... it might be nice if some features that got cut off and stuck in extensions were cleaned up every few versions and certified or even offered as optional check-boxes during new installs.

I thought this was OSS? (-1, Redundant)

Anonymous Coward | about 7 years ago | (#20730533)

How is it that an open source project is taking this long to fix bugs such as this?

Re:I thought this was OSS? (2, Informative)

SplatMan_DK (1035528) | about 7 years ago | (#20730737)

How is it that an open source project is taking this long to fix bugs such as this?
Because knowing the symptoms is not the same as knowing how to fix the problem?

Observing the existence of a memory leak, and knowing where to fix it in your code, are two VERY different things.

- Jesper

Fix the bloat and focus stealing (0)

Anonymous Coward | about 7 years ago | (#20730549)

What happened to the lightweight & responsive firefox (phoenix) as an alternative to pigzilla (mozilla)? Why and how have the bloat, memory leaking and focus stealing been allowed to get so bad? I still use Firefox 0.8 (zero point eight!) as my primary linux browser because the new versions blow chunks.

Focus stealing in everything past 0.8 happens with Focus Follows Mouse and keyboard shortcuts.. You close a window with a keyboard shortcut only to have the wrong window close due to focus stealing. Or the rendering in a background firefox window slows or blocks the rendering of a foreground window.

Even the crutch of a faster CPU can't fix these problems.

the solution is simple (1, Interesting)

Ryzzen (1078135) | about 7 years ago | (#20730601)

www.opera.com ;P

An act of balance (4, Insightful)

SplatMan_DK (1035528) | about 7 years ago | (#20730667)

I can certainly understand why people are tired of FF memory leaks. Being a FF user myself, with open browser windows and multiple tabs all through the day, I have seen what happens to FF after 4-5 hours of intense browsing. And don't even get me started on the PDF and Flash plugins!

Some would argue that the problem is sloppy coding, or poor encapsulation (a typical OO programmers point of view). But please remember, that even though modern browsers are GUI apps, they are coded much like low-level server processes or protocol stacks. Low-level programming using languages like C and C++ gives you more control and better performance, but at the expense of nicer development features like garbage collection and encapsulation.

Think about it. Would you accept a browser that rendered HTML flawlessly and with absolutely no memory leaks, but took more than a minute to render each page? I think not.

It's an act of balance, and the problem is not _always_ "sloppy coding". It is the increasing complexity of these apps, combined with user demands which push the development towards low-level development languages. From a realistic point of view, any app. written in low-level C with as many lines of codes as FF, is bound to have bugs and leaks. (perhaps except code controlling nuclear reactors and NASA satellites, but then the price of each line of code is also somewhat different).

We - the end users - are not without blame.

- Jesper

Re:An act of balance (1)

colfer (619105) | about 7 years ago | (#20730749)

Also, they are swapping the old "Mork" database format, for history and bookmarks, etc., for SQLLite. Performance still has some shaking out to do before Firefox 3 can be released.

Time-based cache (1)

Spy der Mann (805235) | about 7 years ago | (#20730743)

One of the things they're adding is a time-based cache for unused images. For example, if after 5 seconds an image isn't used, it's freed from memory. This alone gave them a huge memory boost, IIRC.

Why I tolerate it (-1, Troll)

DogDude (805747) | about 7 years ago | (#20730855)

I can't imagine why anyone would tolerate such things.

Memory leaks are infuriating, and completely unacceptable. It's just plain bad programming (so much for the "millions of pairs of eyes" thing, huh?). The only reason I still use Firefox is because of adblock. If there were a similar function/feature in IE, I'd be back to using IE.

Firefox/Mozilla and Flash (0)

Anonymous Coward | about 7 years ago | (#20730925)

My biggest problem now is the fact that Firefox/Mozilla usually hangs when I watch Flash videos (e.g., youtube videos) on my ubuntu box. I don't think this has to do with memory leaks though. I have searched around the net for an way to fix the problem but I have not found anything. It seems to be affecting a lot of users though.

Why tolerate? (1)

nerdacus (1161321) | about 7 years ago | (#20730963)

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

Because other browsers have their problems too, and I have to web browse with something.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?