×

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!

Notes On Reducing Firefox's Memory Consumption

timothy posted more than 2 years ago | from the we-gave-it-post-it-notes dept.

Firefox 297

Skuto writes "At yesterdays linux.conf.au Browser miniconference in Ballarat, Australia, Mozilla engineer Nicholas Nethercote gave a detailed presentation about the history of Firefox's memory consumption. The 37 slides-with-notes explain in gritty detail what caused Firefox 4's memory usage to be higher than expected, how many leaks and accidental memory use bugs were tracked down with Valgrind plugins, as well as the pitfalls of common memory allocation strategies. Current work is now focused on reducing the memory usage of popular add-ons such as AdBlock, GreaseMonkey and Firebug. Required reading for people working on large software projects, or those who missed that Firefox is now one of the most memory-efficient browsers in heavy usage."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

297 comments

Firefox is required anyway. (5, Interesting)

Tsingi (870990) | more than 2 years ago | (#38723846)

I use other browsers for development, but only Firefox to browse, it's the only browser that I feel is actively protecting my privacy.

Any other opinions on that?

Re:Firefox is required anyway. (5, Insightful)

stms (1132653) | more than 2 years ago | (#38723910)

I use firefox because my plugins make the web a much nicer place to be.

Re:Firefox is required anyway. (3, Informative)

bemymonkey (1244086) | more than 2 years ago | (#38724028)

Agreed - and the power consumption is much lower than Chrome's (the only viable alternative, IMO) too.

But how do I speed it up? Chrome is MUCH faster on my machine, and I'm using a Firefox profile that's barely a year old, without many add-ons installed (NoScript and ABP go without saying... ImageZoom, NoSquint... that's pretty much it). And Firefox keeps thrashing my disk (No, I'm not swapping it out for an SSD - I only have one hard drive slot in my laptop, and it's filled with a big-ass mechanical hard drive)...

Re:Firefox is required anyway. (1)

Surt (22457) | more than 2 years ago | (#38725530)

If your firefox is a year old, you've missed like 3 major revamps of the javascript engine. The performance difference between then and now is enormous.

Re:Firefox is required anyway. (1)

bemymonkey (1244086) | more than 2 years ago | (#38725676)

Actually I meant that I've been using the same profile for all this time - that hasn't atopped me from upgrading to the latest FF ver

Re:Firefox is required anyway. (-1)

Anonymous Coward | more than 2 years ago | (#38724068)

i use firefox because the colors look so much brighter

More configurable, better plugins. (4, Insightful)

guidryp (702488) | more than 2 years ago | (#38724258)

I use FF because it is much more configurable (about:config has entries for more than any other browser), it also has more plug ins, and those plug ins it does have tend to be more effective for just about everything.

I also don't like Google Chrome calling home all the time (uninstalled). I also have IE9 and Opera installed.

Speed issues are moot outside of benchmarks these days (unless you are running IE7 on a netbook). IMO it is pure placebo effect to say one browser is faster than another in regular browsing on a modern computer.

Re:Firefox is required anyway. (0)

Tsingi (870990) | more than 2 years ago | (#38724516)

I use other browsers for development, but only Firefox to browse, it's the only browser that I feel is actively protecting my privacy.

Any other opinions on that?

Interesting that my totally on topic relevant post attracted one Troll and an Offtopic. I have buddies modding me down! Yay!

And I thought no one cared.

Re:Firefox is required anyway. (4, Insightful)

TheRaven64 (641858) | more than 2 years ago | (#38725014)

I don't see your on-topic post. I see an article about software engineering techniques used to reduce memory consumption, with FireFox used as a case study. You then post about how FireFox protects your privacy. This is about as on-topic as a post saying that you use Android because you prefer the user interface in an article about a new feature in the Linux kernel improving battery life on ARM.

misslabeled linke (0)

Anonymous Coward | more than 2 years ago | (#38723848)

The final link actually shows Firefox is one of the most memory inefficient browsers in heavy usage.

Re:misslabeled linke (2)

bunratty (545641) | more than 2 years ago | (#38723870)

How do you figure that?

Under a heavy load of 40 tabs, Safari for Windows uses the least amount of memory (just 725 MB). Firefox comes in second at 910 MB, followed closely by Opera at 925 and Chrome at 995. Microsoft's own IE9 uses the most memory (1.75 GB).

Re:misslabeled linke (4, Informative)

Tsingi (870990) | more than 2 years ago | (#38723900)

The final link actually shows Firefox is one of the most memory inefficient browsers in heavy usage.

That depends on how you look at it. With one tab open it is comparatively poor, but with 40 tabs open it's very good.

I don't particularly think FFX has even close to the best performance, but those metrics are good. What's more important, good management with a low footprint or a high one? I have to disagree with you there.

Re:misslabeled linke (0)

Anonymous Coward | more than 2 years ago | (#38724862)

You know, there are a lot of open source browsers where you can view the source. I really have to wonder, if Internet Explorer doesn't steal some of that code or at least gets inspiration from it ... They would have to be really stupid not to even look, and really nice guys to just use it for inspiration and nothing more, but I really can't see Microsoft passing up easy money like this.
So, in the end you would compare the work of some people, and the work of other people that improved on the original. That open source projects like this still manage to stay ahead of similar closed source ones, speaks in favour of their programmers.

GJ peeps, keep up the good work, keep the internet free

Re:misslabeled linke (1)

93 Escort Wagon (326346) | more than 2 years ago | (#38725218)

That depends on how you look at it. With one tab open it is comparatively poor, but with 40 tabs open it's very good.

And in which of these states is it most likely a typical (non-Slashdotter) Firefox user will be?

Re:misslabeled linke (1)

Tsingi (870990) | more than 2 years ago | (#38725358)

That depends on how you look at it. With one tab open it is comparatively poor, but with 40 tabs open it's very good.

And in which of these states is it most likely a typical (non-Slashdotter) Firefox user will be?

What difference does it make?

Re:misslabeled linke (1)

glide (97627) | more than 2 years ago | (#38723902)

No it doesnt, the first table shows it inefficient with 1 tab, but the second shows it second to only safari with 40.

Re:misslabeled linke (1)

Yvan256 (722131) | more than 2 years ago | (#38724588)

The funniest part is that Safari for Windows probably has to load extra Apple-related libraries to run. Otherwise I wonder how they can offer Apple anti-aliasing on a Windows system.

I'd be interested to see that same test performed on a Mac OS X system. What do you mean "there's no Internet Explorer on Mac!"? Who cares!

Re:misslabeled linke (0)

Anonymous Coward | more than 2 years ago | (#38725606)

If you're so interested in seeing a Mac OS X test, you could RTFA, since it's there.

Give us more options (5, Insightful)

Anonymous Coward | more than 2 years ago | (#38723876)

I have 8gb of memory on my main computer. I want firefox to use up as much of it as it can to improve my browsing experience. On my netbook, I have 1, I want it to sip as little as it can. There should be an easy way to tell the browser how much memory I want used for certain tasks such as caching and whatnot. Addons should have their own seperate allocation, and each individual addon should be configurable for how much memory it can use.

Free / Open source software is about choices to run things how you want to. With that said, I don't have much room to complain because I've never contributed code to FF.

My main point though, is that screaming "THE RAM USAGE IS TOO HIGH" is not effective. I have a lot of ram, and I want it to be used, just not wasted; and I want more control over it.

Re:Give us more options (5, Interesting)

hedwards (940851) | more than 2 years ago | (#38723944)

250ish MB or RAM is hardly unreasonable and is significantly better than the alternatives. If you don't like the RAM use with Firefox then you sure as hell aren't going to be happy with the competition. I haven't seen a benchmark or other comparison in a long time where Firefox didn't trounce the competition by a significant margin.

TFA does raise an important point that the memory consumption problems are mostly with certain add ons. The vanilla install itself doesn't have those issues.

Re:Give us more options (0)

Anonymous Coward | more than 2 years ago | (#38724080)

I still remember when a hard drive that was 250ish MB was considered big.

Re:Give us more options (0)

Anonymous Coward | more than 2 years ago | (#38724632)

I remember cramming Windows 95 & Office 95 onto 100MB drives. Using floppies. A small office worth of machines. That was fun. /oldfart

Re:Give us more options (1)

pmontra (738736) | more than 2 years ago | (#38725030)

I remember when a 360 kB floppy disk was considered a lot of space. A 10 MB IBM hard disk was physically big in those days, as large as the main case of the IBM PC it connected to.

In other news, hard disks are again bigger then computers nowadays - the Raspberry :-)

Re:Give us more options (3, Informative)

93 Escort Wagon (326346) | more than 2 years ago | (#38725288)

Listen up, young'un - I remember when we bought a 10MB hard disk for our lab's HP1000 mini-computer back in the early 1980s. That thing was the size of a dishwasher.

Re:Give us more options (1)

fatphil (181876) | more than 2 years ago | (#38724342)

Hmm, w3m pulls up, for example, cnn.com's front page and uses only 7MB in total, and that includes all images. The content of that page summed to 440KB. Firefox (version old.old) seems to gobble up 200MB for the same page. Personally, I do think that is unreasonable (and 250MB is even worse).

People are spoiled by having RAM come out of their ears, and don't realise how much wastage and bloat there really is.

Re:Give us more options (0)

Anonymous Coward | more than 2 years ago | (#38724734)

and supports 5% of ff or chromes features. yay.

browsers are actually now more complex than your os. this use some resources

Re:Give us more options (0)

Anonymous Coward | more than 2 years ago | (#38724014)

For some reason, I pictured Jimmy McMillan shouting "THE RAM USAGE IS TOO HIGH". Good stuff.

Re:Give us more options (1, Insightful)

dkf (304284) | more than 2 years ago | (#38724162)

I have 8gb of memory on my main computer. I want firefox to use up as much of it as it can to improve my browsing experience.

No, it shouldn't use any more memory than it needs. Using extra RAM just for giggles is stupid and totally wasteful, especially as the rest of that space could be used for something else. What would that other thing be? I dunno. Maybe an email client, an office suite, an IDE, a photo or video editing suite, or something else. Or even many of them at once. But having to only browse the web because doing anything else is painful... that's just wrong, and it's been wrong for as long as there's been web browsers.

Re:Give us more options (2, Insightful)

0123456 (636235) | more than 2 years ago | (#38724624)

No, it shouldn't use any more memory than it needs.

How much memory does it need? I'd much rather that it cached recent pages in RAM than on disk or not at all.

250MB is nothing on a modern PC with many gigabytes of RAM. My laptop has 6GB, and logged into Gnome with Firefox and another app running the OS is using a whole 900MB, only about half of which is being used by applications. Why not do something useful with the rest of the RAM?

Re:Give us more options (2)

jank1887 (815982) | more than 2 years ago | (#38724976)

Need. What does anyone need? here's the issue. no one cares a hoot how much memory a program needs until you need it for something else. Yes, minimum memory usage is bad when it means your program isn't doing as much as you'd want or like it to do. But, when you set the browser to use a ton of memory, and then need it for something else, how does the computer respond? Few programs can suddenly release a chunk of memory for you because some other program has requested more than is available. If it can, there is lag. Or, heaver forbid, disk swapping. Until memory management is speedy and seamless, there needs to be sufficient available ram for what you might want to do, or you'll be upset when there's a slowdown or hangup. That happy level depends more on the underlying OS than the program, but the program gets to decide how much it wants to try to grab.

I agree with a previous poster, user comparability makes sense here. Most users would probably miss it, but those who don't could at least make the choice and only blame themselves, and not the program, if things get clunky.

Re:Give us more options (1)

ledow (319597) | more than 2 years ago | (#38724514)

I'm currently using Opera - Two windows and over 20 tabs open with different fully-loaded "big name" websites in all tabs. Some logged in, some not. Instant access to all my emails dating back to pre-2000 (with instant-narrow searching) covering some 5-6 Gb of email files on my profile (several POP and IMAP accounts all downloaded entirely to the Opera mail client) - which Opera stores as SQLite files, IIRC.

The same Opera session has been running for about 2 weeks straight, just suspend/resume as I take the laptop from work to home (and it's actually being used for about 16 hours a day for work and personal use, not sitting idle!)

Memory usage in Windows? 300Mb.

There's no reason for anything to use Gb's of memory internally. Sure, there's caching etc. but that *can* adjust to the memory left in the PC (i.e. on small PC's, ditch memory cache, on large PC's leave it in memory). Program use, though, loading on common websites even with tons of Javascript - there's no reason to use more than a few hundred megs or so.

And my Opera *FLIES* when switching tabs etc. and doesn't touch the disk at all. Granted that there are places you can have memory/speed trade-offs but a bog-standard application like a web browser isn't one of them. Read network, interpret, display, forget or remember when tab is closed depending on user preference. That's it. There's nothing complex there at all to suck up memory like Firefox can.

Re:Give us more options (0)

Anonymous Coward | more than 2 years ago | (#38724786)

You are not smarter than your computer. It knows when it needs to allocate memory better than you do.

Re:Give us more options (1)

Anonymous Coward | more than 2 years ago | (#38724914)

The problem is that other people are designing it to allocate that memory according to their own ideas, which are not necessarily better than yours or applicable to your particular use case... The computer isn't self-aware. Yet.

Re:Give us more options (5, Insightful)

Seumas (6865) | more than 2 years ago | (#38725050)

I have a lot of RAM, too. And Firefox runs like shit. It has for years and I've constantly heard the response of "no, you don't understand! it's just how it handles its back button function! That's why it uses two or three gigabytes!". I have 16gb on my primary system, so it can certainly use a few gigs if it really wants to. The question is - does it need to? More importantly, how does it perform when it's using so much RAM? That is the real problem.

For years, I have put up with the experience of Firefox slowly grinding to a crawl. Within hours (certainly within a day at the most), it reaches 2.5gb or more memory usage and becomes unusable. Almost every action - typing, scrolling, clicking a button, entering a URL, clicking a link - causes it to hang temporarily. Sometimes for almost a minute. Click a tab. Hang. Scroll to the bottom of the page. Hang. Type in the text box. Hang. Submit. Hang. Close tab. Hang. Terrible experience.

And, I stuck with it. Restarting the browser every few hours just became part of the experience (starting around early 3x, I believe). I primarily stuck with it, because I love Firefox and have used it forever. And Mozilla before that. And Netscape before that. Part of that is that I cut my teeth as an engineer at Netscape when I was young. It was my first real job. So I had a particular affinity for it, always. Besides, eventually they'd fix the issues. Even though they went forever claiming there weren't any memory issues . . . until sometime recently (last year, I think?) when there finally seemed to be acknowledgement of it.

Most of all, I like having the access to extensions. Primarily, adblocking extensions. And then the tree tabs extension. And then panorama/tab candy was built into 4x. I tried Chrome several times, but their shitty handling of many tabs was terrible. I couldn't tolerate it. Firefox did it beautifully.

And then, I finally got fed up. After all those years and all the delaying and all the excuses I made for Firefox, I decided a couple months ago that I would go full time Chrome and just see what it was really like. The result? I'm sold on Chrome, now. I can't believe I'm saying this, but I am. I never have to restart due to it behaving slow. I never have to restart due to it using too many resources. I never have it beach-balling for a minute at a time for every action I do. I never have Windows telling me the application has stopped responding. It just works.

And here's the thing. It uses just as many resources, sometimes. Just like Firefox, I sometimes find it using as much as 3gb of memory. But where Firefox would start grinding to a halt around 1.5-2.5gb of usage, Chrome just keeps smoothly chugging along under as much as 3gb (and possibly more, but it never has used more than that, so I don't know).

So, we can make all the excuses we want for Firefox. When it comes down to it, what matters is that my browsing habits cause Firefox to perform fucking terribly, while Chrome doesn't flinch. And when it comes down to my time and sanity, I need performance; not excuses.

Re:Give us more options (5, Informative)

TheRaven64 (641858) | more than 2 years ago | (#38725068)

I want firefox to use up as much of it as it can to improve my browsing experience

RTFA. When FireFox has an off-by-one error in its JavaScript string concatenation code that causes it to allocate twice as much memory as it needs for JavaScript strings, it's not using memory to improve your browsing experience, it's just using memory. When FireFox is storing decompressed images in memory that never actually make it to the screen, it's not using memory to improve your browsing experience, it's just using memory.

Most of the techniques in TFA were of general interest to anyone working on a large project, not just to FireFox.

Re:Give us more options (2)

iMadeGhostzilla (1851560) | more than 2 years ago | (#38725600)

I wish each tab had a flag "this tab is important -- don't release memory allocated with this tab if not visited for a while." Most of my browser memory is wasted on tabs that I didn't bother to close even though I'm not coming back to them.

Re:Give us more options (1)

thereitis (2355426) | more than 2 years ago | (#38725726)

I want more control over it That's the key point. Use more RAM, it's faster but there's less available for other applications. Use less RAM and it's slower but there's more available for other applications. It's a tradeoff, like most things, and the user should be in control of that tradeoff.

Firefox's problem (5, Insightful)

TheLink (130905) | more than 2 years ago | (#38723884)

In my experience Firefox (minus plugins etc) has leaked/used less memory than Google Chrome.

BUT, when a plugin/page starts leaking lots of memory the difference is with Google Chrome you can close the offending tab/window and the memory is freed up. You don't lose your sessions, don't lose your place on other tabs/windows. You can even reopen the page (esp if the page just slowly uses more and more memory).

In contrast with Firefox you often have to close the entire browser to free up the memory. And IMO that's Firefox's biggest problem when it comes to memory.

It doesn't matter how much better Firefox is on its own at memory management, in practice many people using Firefox are using it because of the plugins (otherwise they'd be using some other browser), and the plugin developers may not be so good at memory management.

Re:Firefox's problem (3, Informative)

hedwards (940851) | more than 2 years ago | (#38723964)

It depends which ones you're talking about. Some of them are already in their own separate process and you can kill those processes without having too much trouble. The bigger problem right now is all the freezing that goes on. I'm not sure what the problem is, but it gets a lot worse when I also have thunderbird open.

Re:Firefox's problem (1)

DrXym (126579) | more than 2 years ago | (#38724394)

Plugins run as a separate process to Firefox now, so if it leaks you can kill the plugin container. You could also close the tab if it's responsive and clean up.

Re:Firefox's problem (1)

mapkinase (958129) | more than 2 years ago | (#38724750)

I do not know a way to identify which plugin corresponds to which tab. Usually, if you have a video running, it's instance of a plugincontainer take the most CPU, but as for the rest - no idea who is what. Also sometimes there are 20 or so of them (don't die gracefully) and need to be killed one by one tediously.

Re:Firefox's problem (1)

TheLink (130905) | more than 2 years ago | (#38724848)

Sorry I was using the wrong term, should be add-ons. The other add-ons like extensions don't run as a separate process and they're often the ones that cause Firefox to leak more.

Remove/disable the extensions and Firefox leaks less, but then you might as well use Chrome :).

Re:Firefox's problem (4, Informative)

olau (314197) | more than 2 years ago | (#38724518)

It doesn't matter how much better Firefox is on its own at memory management, in practice many people using Firefox are using it because of the plugins (otherwise they'd be using some other browser), and the plugin developers may not be so good at memory management.

Actually, the presentation addressed that. They're going to add a notice to known bad add-ons at the Mozilla add-on page (social engineering), and also add a basic leak test to things done by the reviewers.

Re:Firefox's problem (1)

mapkinase (958129) | more than 2 years ago | (#38724726)

>In my experience Firefox (minus plugins etc) has leaked/used less memory than Google Chrome.

I corroborate with that. Recently I got tied of Firefox and decided to try Chrome. I have got less memory usage per instance but instances open, so in sum, Chrome ends up with more memory usage. First thought that comes to mind is that with new tab - new thread/processor iedology one might bring unnecessary overhead into play. I suspect that Firefox does it only for pages which require plugins (runs its plugin-container thing).

I also prefer FF's stage approach to page display, while Chrome seems to be hanging, then brings the final page.

Re:Firefox's problem (1)

Migala77 (1179151) | more than 2 years ago | (#38724772)

Firefox developers have been claiming that plugins were to blame for a long time (and for some FF versions they may have even been right, judging from TFA). However, there was no way to do something about it, or even just find out which plugin was the problem. TFA finally gets this:

Although these leaks are not Mozilla’s fault, they are Mozilla’s problem. Many Firefox users have add-ons installed -- some people have 20 or 30 or more -- and Firefox gets blamed for the sins of its add-ons.

Now they are going to improve reviews and make it possible to mark add-ons as memory-hogs / -leakers.

i'll do my own tests (1)

EponymousCustard (1442693) | more than 2 years ago | (#38723894)

i won't be taking TomsHardware's word for it since I run Linux and they didn't even bother testing with it. but it does motivate me to perform my own checks. memory usage and sluggishness were the reasons i ditched firefox for chromium last year.

Re:i'll do my own tests (5, Insightful)

Anonymous Coward | more than 2 years ago | (#38724008)

Yeah, most of the improvements were in the last 4-6 months.

Anyone else get tired of this... "blah blah, my favourite open source browser wasn't competitive with the commercial product by an ad agency that records every keystroke I type in the URL bar a long time ago, possibly due to some addons I was running, so I just completely gave up on it and whenever a story comes up on how it has improved, I just state how it sucked at some time in the past and I'll never try it again"?

Re:i'll do my own tests (-1)

Anonymous Coward | more than 2 years ago | (#38724224)

No, but I'm tired of Failfox masturbators who don't seem to grok that their shitty browser is shit - with zero plugins installed - on every single platform it's available for.

HURR MUST B PLUGINZ LUL

Re:i'll do my own tests (1)

gparent (1242548) | more than 2 years ago | (#38724594)

Maybe you should learn to report bugs. Because hundreds of thousands of people are running the browser with no issues.

Re:i'll do my own tests (0)

Anonymous Coward | more than 2 years ago | (#38724978)

No, because it all serves to highlight how nobody should ever get complacent and stop listening to users. I understand what you're saying, but the fact is for a long time FF was a memory hog. First the issue was ignored and people were told they were imagining it, then users were ignored (or actually told "that's how it's meant to work, if you don't like it you can fiddle around in the config"). Users have long memories - if you don't want to annoy a bunch of them and have them bad-mouthing your product for years to come, listen to their concerns.

Chrome probably is collecting all kinds of user data, which is clearly bad, but it's not obvious to users so they're not concerned about it. What they see is that it's fast and lightweight and uncluttered - all the things they were asking FF to be for years and getting no response. For me, I've finally switched to Chrome for my home use - I still use FF primarily at work (for the plugins, essential as a developer), but the last three versions have become increasingly unstable, I now have it crash at least once a day and randomly lock up maybe two or three times a day. I don't experience this with Chrome so I'll risk the privacy concerns (and use an alternative for times when I value my privacy) in favour of stability.

Re:i'll do my own tests (1)

fatphil (181876) | more than 2 years ago | (#38724110)

However, I also don't trust the Firefox developers because after several years of being accused of being memory hogs, and every single time staunchly denying it, brushing off such issues by saying they were "features" like "caching", they finally admitted they were in the wrong. When you've lied so many times, why should anyone trust you any more?

Again, as from your perspective, that motivates me to perform my own checks. However, if they don't provide a ready-built linux/ppc64 .deb with correct dependencies, I'm certainly not going to be bothered. "I've got a girlfriend and things to get done..."

Re:i'll do my own tests (1)

PybusJ (30549) | more than 2 years ago | (#38724244)

I've been running recent firefoxen on 64 bit Ubuntu with over 340 open tabs. It used over 1.5Gb RAM, but that seemed reasonable in the circumstances. Chromium failed entirely with a fraction of the tabs.

On the other hand, I did find a firefox extension a couple of months ago which managed to leak over 1Gb/day (I'm afraid I can't which it was).

Re:i'll do my own tests (1)

brunogirin (783691) | more than 2 years ago | (#38724396)

I haven't tried that many tabs but I have also been using FF on 64 bit Ubuntu: it starts virtually instantly and is a lot faster and leaner than previous versions.

Re:i'll do my own tests (4, Funny)

Thud457 (234763) | more than 2 years ago | (#38724426)

with over 340 open tabs

I think it's time for PybusJ to admit he has a pr0n problem...

Re:i'll do my own tests (0)

Anonymous Coward | more than 2 years ago | (#38724566)

...which managed to leak over 1Gb/day (I'm afraid I can't which it was).

Was it the firefox grammar checker extension?

Re:i'll do my own tests (1)

pmontra (738736) | more than 2 years ago | (#38725082)

Amazing. How do you manage all those tabs? I bet there are desktop environments that crash with a fraction of that number.

Re:i'll do my own tests (0)

RicktheBrick (588466) | more than 2 years ago | (#38725042)

I run AVG anti-virus. I am now using firefox. I used to get a message from AVG that firefox was using a lot of memory. It would vary from over 300 million bytes to over 500 million bytes. If I type ctrl-alt-del and look at processes, I find that firefox is now using about 140 million bytes and the two chrome sessions I have open are just using about 60 million bytes. The reason I have chrome open is that there is a game that will always hang up under firefox but will give me a message asking me if I want to wait for the flash to finish under chrome. The main reason I stay with firefox is that there are too many passwords and bookmarks that I would lose if I discontinued it since I have been running it for years. My computer usually uses around 2Gbytes of ram memory so windows xp is also using a lot more memory too. I was trying to see why a older computer was so slow so I typed ctrl-alt-del on it. Without any applications running it told me that the computer was using about 550 million bytes of memory. Since the computer only had 512 million bytes of memory I guess it was using the hard drive for memory. Therefore even old computers need at least a 1Gbyte of ram memory to run with any amount of speed.

Firefox 4? (0)

Anonymous Coward | more than 2 years ago | (#38723908)

I'm already up to Firefox 9, so this must be from the ancient past, right?

Re:Firefox 4? (1)

jperl (1453911) | more than 2 years ago | (#38723996)

I'm already up to Firefox 9, so this must be from the ancient past, right?

If 22nd March 2011 is ancient past for you, then yes. Thanks to the new release cycle, version numbers increase every 6 weeks.

FYI, Adblock Plus no longer blocks ads :-( (-1, Offtopic)

Anonymous Coward | more than 2 years ago | (#38724016)

The latest versions of Adblock Plus allows so-called "acceptable ads" [adblockplus.org] by default. Because the extension author's idea of "acceptable" advertising includes third-party scripts and cookies, it's possible this new "feature" could eventually expose you to drive-by malware downloads or tracking cookies.

Thankfully, Adblock Plus is open source and a fork without the "acceptable ads" feature enabled has appeared: Trueblock Plus [mozilla.org].

Re:FYI, Adblock Plus no longer blocks ads :-( (0)

Anonymous Coward | more than 2 years ago | (#38724188)

Or you could, you know, uncheck the "allow acceptable ads" and you will be back to normal...

Re:FYI, Adblock Plus no longer blocks ads :-( (0)

Anonymous Coward | more than 2 years ago | (#38724428)

thanks for that! just unchecked it - stupid to have it on by default, isn't it?

Re:FYI, Adblock Plus no longer blocks ads :-( (1)

gparent (1242548) | more than 2 years ago | (#38724626)

Of course it's not stupid. It's the whole reason for the feature in the first place. So that 'acceptable' ads can be shown and used to support the websites you visit. They need the money, you know. The reason it's on by default is that the ads are specially screened for their acceptability, and only ads that are deemed not annoying to users are presented.

Re:FYI, Adblock Plus no longer blocks ads :-( (0)

Anonymous Coward | more than 2 years ago | (#38724782)

Each ad is NOT screened before it is whitelisted. The ad companies on the whitelist simply have an agreement with the Adblock Plus author to follow certain guidelines.

I'm sure the New York Times [wired.com] had a "do not infect our users" agreement in place, too...

Re:FYI, Adblock Plus no longer blocks ads :-( (0)

Anonymous Coward | more than 2 years ago | (#38725396)

The reason it's on by default is that the ads are specially screened for their acceptability

Blatantly FALSE. This is the list: https://easylist-downloads.adblockplus.org/exceptionrules.txt
Anything matching these simple filters is displayed. (I had to insert a couple of spaces on the last line to get the comment through the spam filter.)

[Adblock Plus 2.0]
! Checksum: apz2+jXNPQ5CLFYHWghn6A
! Expires: 10 days
! Text-based search ads on suche.netzwelt.de
@@||google.com/uds/*$script,subdocument,document,domain=suche.netzwelt.de
@@||suche.netzwelt.de^$elemhide
@@||google.com/aclk^$domain=suche.netzwelt.de,subdocument
@@||googleadservices.com/pagead/aclk^$domain=suche.netzwelt.de,subdocument
||images.netzwelt.de/partner/*
! Static image ads on t3n.de
@@||guruads.de/api/view/*$script,domain=t3n.de
@@||guruads.de/u/b/*$image,domain=t3n.de
! Text ads on Sedo parking domains
@@$sitekey=MFwwDQYJKoZIhvcNAQEBBQADS wAwSAJBANnylWw2vLY4hUn9w06zQKbhKBfvjFU CsdFlb6TdQhxb9RXWXuI4t31c+o8fYOv/s8q1LGPga3DE1L/tHU4LENMCAwEAAQ,image,~image

Here's how Eric Bishop (the guy behind Trueblock Plus) responds:

Q: It's possible to turn the ads off in AdBlock plus, isn't that good enough?

A: No, it's not. Defaults are very powerful things, most people never touch them. People react very differently [psychologytoday.com] depending whether a choice is presented as “opt-in” vs “opt-out.” The creator of Adblock Plus knows this, saying that enabling ads by default is “the only way to reach the goals [adblockplus.org].”

Q: Adblock Plus claims their “goal” is to prevent the loss of advertising revenue to meaningful and important sites that rely on it for survival. Isn't that a good thing?

A: Maybe, but that explanation neatly side-steps the real problem. The problem is that I want to be able to decide for myself which sites are meaningful and important. When Adblock’s “acceptable” ads are enabled, the user is not the one deciding which sites get a pass and which do not, the owners of Adblock Plus are. That is a huge problem. The person that controls this “acceptable” list can sell a spot on the list to the highest bidder, making a profit by violating your trust. While impossible to prove, it seems likely the real motivation behind this feature is greed and has nothing whatsoever to do with any sort of altruistic desire to preserve websites that depend on advertising revenue.

This [adblockplus.org] is the list of current “acceptable” ads, as defined by Adblock Plus. This list includes text advertisements on Sedo parking domains [wikipedia.org], a giant company that sells domain names, and publishes advertisements on unused domains. This is hardly a poor little website where meaningful content is in danger of disappearing because no one will view their advertisements.

Re:FYI, Adblock Plus no longer blocks ads :-( (0)

Anonymous Coward | more than 2 years ago | (#38725018)

Except that option is bugged and does not actually work properly.

Besides, it's a matter of trust. ABP is an ad-blocking product that now has a whitelist of ads it allows to be shown. This would not be a problem if it was a user-configurable list that was disabled by default, but that is not the case. The authors have chosen to a) prevent users from editing the list, b) they have enabled the option by default, and c) they have been dishonest about the entire issue from the beginning and continuing to present. That's three strikes, each one ethically unforgivable given the circumstances.

Please read what Eric Bishop (author of Trueblock Plus) has to say on the matter before you dismiss this as a non-issue. Frankly, the PR coming from ABP is disgusting, but what offends me more is the fanatical support they seem to have stirred up in their userbase. Read the description and FAQ on the project homepage (it's short, I promise): https://trueblockplus.org/

Re:FYI, Adblock Plus no longer blocks ads :-( (-1)

Anonymous Coward | more than 2 years ago | (#38724220)

Adblock is basically piracy. By using adblock, you support laws such as SOPA and PIPA.

Re:FYI, Adblock Plus no longer blocks ads :-( (1)

RotateLeftByte (797477) | more than 2 years ago | (#38724504)

Citation Needed.

I am sure that many people here would like to know how you equate Ad-blocking with supporting SOPA?

Come on please tell us.

Why the hell here? (0)

Anonymous Coward | more than 2 years ago | (#38724256)

At yesterdays linux.conf.au Browser miniconference in Ballarat, Australia...

Wait what? Something actually happened in this god forsaken place? Something I.T. related that wasn't IBM [ubtp.com.au] related, IBM sponsored, a thought bubble from IBM, an idea from someone who use to work for IBM or taught for IBM or was a student at the IBM approved University courses? linux.conf.au Sponsors [linux.conf.au].... knew it was too good to be true.

Pale Moon browser (4, Interesting)

kriston (7886) | more than 2 years ago | (#38724294)

Windows users should investigate the Pale Moon browser over at www.palemoon.org. Firefox optimized and without all the gunk.

In my experience... (2, Funny)

Windwraith (932426) | more than 2 years ago | (#38724378)

Firefox is the app that uses the most RAM in my system, has always been, even more that Skyrim under WINE. I tried Chrome for a while, and while I didn't dislike it, I simply didn't want to forfeit my customized environment.
However, I never saw Chrome as using any less RAM. I usually got Firefox with 20+ tabs open (and around 100 in "not loaded in RAM" mode with the new features, think old BarTab) grouped in Panorama groups. In Chrome, because tab space is small, I usually had around 20, and both browsers were consuming 400mb of RAM each. I'd say Firefox uses LESS memory overall.
Thing is, firefox FEELS slow. Try to open Youtube's subscriptions page and you'll lose control of the browser for at least one second.

I can easily see people unable to close their porn when their significant other enters the room. Porn moves the world, thus people would prefer to use Chrome for porn. Thus Chrome's usage rises while Firefox's decreases. If Mozilla makes it more convenient to use Firefox for porn, the browser usage will crush Chrome.

=YAWN= (-1)

Anonymous Coward | more than 2 years ago | (#38724470)

Mozilla engineer Nicholas Nethercote gave a detailed presentation about the history of Firefox's memory consumption

Sounds like the most boring shit ever! Why not a presentation about bikini girls working at a goblin car wash? Then I might pay attention!

Dislike the term "memory leak" (0)

Anonymous Coward | more than 2 years ago | (#38724472)

Applications that are said to leak memory are really failing to release allocated memory that they requested. The application doesn't have memory to leak at all.

I suggest a better term for this is "memory hoarding."

Re:Dislike the term "memory leak" (1)

Geeky (90998) | more than 2 years ago | (#38724710)

I sort of agree, except it's the standard term so everyone knows what it means.

I'd see hoarding as something slightly different anyway. Application grabs memory because it needs it. Then doesn't release it when it not longer needs it. If it then reuses that memory internally next time it needs some, that's hoarding. It's not admitting that the OS might do a better job of memory management and being greedy. Same with applications that grab more than they need on startup instead of waiting for when they really need it.

Leaking would be grabbing memory, not releasing it, "forgetting" about it (i.e. losing the pointer) and then asking for more when needed.

Firefox: Designed By Morons. Here's a simple test: (1)

Anonymous Coward | more than 2 years ago | (#38724646)

Dump the firefox address space to a file and check the proportion that's simply text urls. For a daily user with history set to a typical value like 30 days it's shockingly large - tens to hundreds of megabytes. That's mostly the sqlite url/places db. Simple lz77 on *.sqlite gives a 50% reduction. Dictionary-based schemes would give a 95% reduction; academic work shows all urls can be coded in 4-5 bits. The few extra cycles per lookup are nearly free, and much cheaper than RAM.

There are hundreds of equally dumb design decisions holding back necessary features. Have fun waiting for a competent sandbox.

Re:Firefox: Designed By Morons. Here's a simple te (1)

jlebar (1904578) | more than 2 years ago | (#38725240)

Dump the firefox address space to a file and check the proportion that's simply text urls.

You are aware that not all of Firefox's address space is in memory, right? I'm pretty sure that Firefox does not use hundreds of MB of RAM just for storing URLs.

Re:Firefox: Designed By Morons. Here's a simple te (1)

TheRaven64 (641858) | more than 2 years ago | (#38725660)

academic work shows all urls can be coded in 4-5 bits

5 bits gives a total of 32 possible URLs, so this is only true for very small Internets...

Or do you mean 4-5 bits per character?

Slop analysis doesn't add up (1)

fatphil (181876) | more than 2 years ago | (#38724752)

See page 27 of the PDF. He explains that the allocator, jemalloc, rounds up some allocation requests to easier to handle size. He calls this wastage "slop". Then look at the final point on that page - in order to reduce slop, always allocate a power of two sized block, as those never have slop.

So in order to stop the allocator wasting memory by using up more memory than requested, we're supposed to ask for more memory than we need? That seems to be a facepalm moment. Let's move wastage to where we can't measure it, so that we can't see any wastage any more. The bind moggles.

Re:Slop analysis doesn't add up (1)

dkf (304284) | more than 2 years ago | (#38725080)

So in order to stop the allocator wasting memory by using up more memory than requested, we're supposed to ask for more memory than we need? That seems to be a facepalm moment. Let's move wastage to where we can't measure it, so that we can't see any wastage any more. The bind moggles.

No, but there's a lot of times when you over-allocate deliberately so you can expand into that space. This is the key to making things like string concatenation fast (an exponential growth strategy — multiplying the space requested by a constant factor each time — gives amortized constant time for memory allocation per byte when building up by appending, which is a hugely common operation). This is fine, but since in this situation you have precise control over how much to request as you don't need it all instantly, you can ask for amounts that are likely to be efficiently handled, minimizing the amount of space that has been allocated at the low level but not actually made available to the consumers of that space (i.e., that's the slop). It's a really easy tweak to make once you are aware of the problem, and it will nearly halve the amount of memory that some data structures use. Big Win.

Re:Slop analysis doesn't add up (1)

fatphil (181876) | more than 2 years ago | (#38725510)

The frequency of reallocations issue is orthogonal to the slop (measurable or unmeasurable) one. Anything that your allocation strategy does will cause on average as much excess slop (by pushing allocations into a bigger band) as it reduces slop (by being closer to the limit of the band).

There is nothing intrinsic about powers of 2 that makes allocators significantly more efficient. See recent comp.lang.c discussions (last 2 weeks) about the superstitions which surrounds powers of 2, and their debunking. (Or just look in the commit history for the linux kernel for the kcache pool implementation)

Re:Slop analysis doesn't add up (3, Informative)

jlebar (1904578) | more than 2 years ago | (#38725192)

See page 27 of the PDF. He explains that the allocator, jemalloc, rounds up some allocation requests to easier to handle size. He calls this wastage "slop". Then look at the final point on that page - in order to reduce slop, always allocate a power of two sized block, as those never have slop.

So in order to stop the allocator wasting memory by using up more memory than requested, we're supposed to ask for more memory than we need?

What's to stop us from changing a 1025-byte allocation to 1024 bytes, rather than 2048 bytes, as you assume? There's no reason we need round up, and indeed we usually don't.

But note that even when we do round up, it's still an improvement: The slop is rarely usable memory -- you can't use it without first calling malloc_usable_size to realize that you have any slop. But if we round 1025 up to 2048 bytes, now we have almost double the amount of memory to play with. We pay 2048 bytes either way, but when we round up, we get to use all the memory we allocated.

Re:Slop analysis doesn't add up (1)

b4dc0d3r (1268512) | more than 2 years ago | (#38725734)

IIRC the most important part of that was allocating a standard sized bit of memory was calculated at the nearest power of 2, or 1024 bytes. Then the allocator adds a header and rounds to the nearest power of 2. So a request for 1024 bytes including slop space actually gets 2048. That was one of the biggest fixes they made - don't pre-calculate overage in multiple places, just ask for what you need until you get to the actual allocator.

This was memory designed to expand into, basically their own C-style alloc() function, which requests a chunk from the OS and divides it up for the application to use, in order to speed up repeated allocations. Not sure why C/C++ wasn't good enough tho.

Is this a priority? (0)

Anonymous Coward | more than 2 years ago | (#38724770)

"Current work is now focused on reducing the memory usage of popular add-ons..." -- Folks, we need the 64-bit version, and presto. Memory is not an issue these days so get over it. If they meant "memory leaks" rather than "memory usage" then I would understand the concern.

Hmm (1)

ILongForDarkness (1134931) | more than 2 years ago | (#38724802)

I get warnings from AVG about every other day warning about FF memory usage looking suspicious. I'm pretty sure I'm not infected with anything. But having say 3-4 tabs open on Win 7 (might be the problem ;-)) uses ~560MB of RAM. Not overly complex sites either, /., coding site, youtube say (not playing a video). That said I rarely hit 80% of RAM used overall so I don't really care how FF uses my RAM other than if more RAM implies slower because more stuff has to go back and forth to the CPU. It could just mean that FF preloads a bunch of stuff so it runs faster though (don't hear a lot of people say it is faster :-)) so tricky.

Too late (0)

Anonymous Coward | more than 2 years ago | (#38724918)

Remember when Firefox was the little browser that stood up against the big bad IE6? That was over 7 years ago now, which is sad because there are a lot people online too young to remember the IE/Netscape wars and how a "Phoenix" rose from the ashes of Mozilla/Netscape. Firefox became fat despite removing features such as the status bar, and his "quick fix" diet didn't work well enough. Now Firefox is getting his ass kicked by Chrome daily and IE10 will be coming up soon which will smack him when hes down.

It's time to for the Phoenix to rise again, chop of all the fat from Firefox and become the little browser that could once more.

Next build of FireFox (0)

Anonymous Coward | more than 2 years ago | (#38725104)

is reportedly code named "Honey Badger" because it takes all the memory it wants.

So does Firefox 9 still use a lot of memory? (0)

Anonymous Coward | more than 2 years ago | (#38725134)

Or did they fix Firefox 4? Just wondering if I should upgrade to the latest FF9, since I'm still running FF 3.6...

firefox (1)

aahpandasrun (948239) | more than 2 years ago | (#38725302)

I love Firefox. It still has a few annoyances though. Having to sometimes manually kill the Firefox task to start a new browser window because it's "already open" is my biggest one. But, I still love its customizability over the sheer rigidness of Chrome.

Memory leaks are easy (3, Interesting)

kbg (241421) | more than 2 years ago | (#38725712)

I have never understood why memory leaks are so problematic to find. When I was programming in C long ago and had memory leaks, I simply created my own wrappers for malloc and free that stored where in the source code it was being called from, then at the end of the program I could simply check this list and it would display all the memory that had not been released and the corresponding line in the source where malloc was called.

Fuck Firefox (0)

Anonymous Coward | more than 2 years ago | (#38725718)

Ever since they copied chrome with the tabs in the titlebar idea it has been slow as balls (referring to program start time not necessarily page loading time). Chrome for the win.

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...