They've now hit the point where they're largely fixing bugs in add-on writer's code, rather than their own.
How are you current Firefox users finding the RAM usage, especially compared to Chrome?
The internal memory measurements (about:memory) come out as 835mb resident for Chrome, and 324mb (of ‘explicit’, whatever that is) for Firefox.
I’m not using any extensions in Chrome. In Firefox I’ve got installed Firebug, FireFontFamily, FireQuery, Lastpass, PDF.js and QuickJava.
Edit: oops, missed cloning a tab with a video in over to Chrome. That explains the disparity in Flash, and you could probably expect to increase Chrome’s real mem usage a little had I not closed it already…
Your comparison is useful overall, but not relevant to this change.
I'm fairly sure that multiple studies have shown that Chrome uses more RAM than Firefox. But that's not what's important - all that matters is whether the browser appears snappy to the user. That's much more so the case with Chrome than it is with Firefox.
Note that Memory consumption is somewhat related to Snappiness: if it is too high, the program will slow down (paging, longer garbage collecting pauses, ...) and feel less snappy.
But also, it takes a while to swap (upon which it beachballs all over the place), and it's not very intelligent about when to swap.
It's a 2.00 GHz quad-core machine, so I have plenty of CPU power. It's just that when I get working on more than one or two things at once, switching between them swaps everything to heck.
BTW, History / Recently Closed Tabs is one of my favorite FF (only) features.
But also note that Opera's had a Recently Closed Tabs dialog for as long as I can remember.
Chrome also has the "Recently Closed" list.
It's been in Chrome for awhile.
However, that change broke something in earlier versions of the Add-on SDK, which means that at least one Add-on was then leaking memory like crazy. Upgrading that add-on to the latest version fixed _that_ leak.
There are a few reasons for that. (1) There's no tab abuser worse than me. I have hundreds of them around (I have commented before, why I have it that way) (2) I do all my browsing from a (battery less) laptop with 512 MB of RAM. (3) I do not close my browser for months on end. On top of that I expect that I should be able to do my usual editing etc while I have the browser open.
For this very corner'est of corner cases, if I use Chrome, my box goes into a fetal position and dies. However, and kudos to FF 3.6, (yeah 3.6!) my laptop works great, no problem at all. I have flashblock, no script, bar-tab, memory fox, bunch of greasemonkey scripts (to fix google's layout, and give github and bitbucket a dark theme) and have tweaked FF's cache settings.
On a more performant box I am on FF-11, but have never upgraded on the other, fearing that the new FF assumes (not unreasonably) the box to have more memory.
- Inability to run a private browsing window at the same time as my regular browsing.
- No desktop notifications. (There appears to be an outdated and/or unmaintained add-on for this?)
- No working equivalent of a few app-specific extensions (Google Voice button, Google+ +1 button, Google Reader inline previews)
No idea about the other ones though.
I tend to leave it running all the time.
For me, I went with an Add-On named "TooManyTabs": https://addons.mozilla.org/en-US/firefox/addon/toomanytabs-s...
"To SPEED UP your Firefox, when a tab is added to TMT, it is unloaded from browser and its tab state & history are stored in TMT. When you click on a tab, the tab is opened again from disk cache, with tab state & history restored if available; (Please note that the memory freed varies and is subjected to different websites.)"
When I come back to the browser, if I haven't used it in a while, I send all the currently open tabs to a new row which unloads them from browser memory. Then, when I get a chance, I go back to the various rows and clean out the tabs I don't want to keep and the condense them down to the "real gold".
Once I have what I want to keep, I restore the tabs and then use another Add-On named "CopyAllUrls": http://www.plasser.net/copyallurls/
This one lets you generate, to the clipboard, any number of markup formats (including HTML) containing the details of all the tabs you have open (with configurable options for details).
I tend to paste this comment into Gmail with a special tag (email@example.com) which triggers a "mark as read" filter. I do this because all I need is web access, regardless of the browser, and I can get access to all my bookmarked content with the power of Google Search. In addition, on my desktop and mobile phone devices, the mail is automatically sync'd to it for me to carry around for instant access.
The second add-on you have linked is interesting due to the many possibilities it opens up. I am certain that some people who read Hacker News will find it useful for their purposes.
Just like you said, for me tabs are my "volatile" bookmarks and a TODO list. The upside is that it automatically records the history of the browsing session a call/cc if you will. It is also in my face, reminding me about it. It has a tiny cost associated with keeping it open forcing me to not procrastinate on it for ever. Many a open tab graduate into being genuine bookmarks.
I have tried FF4 and without add-ons it does not do everything that I do with 3.6 with add-ons. The critical part is unloading the content of the tabs when it has not been viewed in a while. The other feature I like is the ability to search through the content of the tabs.
With the add-on set that I have, I leave my FF open for months on a 512Mb box with no issues. So I assume all the leaks have been iron out of 3.6 by now or the memory fox add-on does a good job of garbage collection.
I browse through the tabs I have open at leisure, finishing the business I have with them as convenient. I can easily end up closing 200 tabs during a period like that, since afterwards they're not useful to me anymore. When I am done with a website (say, opened all the interesting articles and comment pages from the hacker news frontpage) I do close the tab, instead of leaving it open and looking for it later.
But a larger point is that I disagree with the trend of using more hardware for doing less but taking the same quantum of running time , especially so when there are easy non-onerous alternatives. Much that anyone may want to manage my expenses, doing it this way frees up money that I can spend elsewhere, where I am more keen.
This box of mine is not worth spending more money over, but useful enough that its a loss if I junk it.
...what if the user has a high-end machine with 16GB of RAM? Then paging isn’t an issue. But this improvement will still be a big deal on such a machine. This is because garbage collection and cycle collection cause pauses, and the length of the pauses are roughly proportional to the amount of live heap memory. (Incremental garbage collection will soon be enabled, which will result in smaller garbage collection pauses, but there are no plans for incremental cycle collection and so cycle collection pauses will still be relevant.) So even on high-end machines with lots of RAM, leaks can greatly hurt browser performance.
Every time, Mozilla devs claim all the bad bugs will be fixed in the next version. I heard it for v2, for 2.5, 3, and 3.5 and now of course whatever crazy version number Firefox is on now. It still sucks, but now I don't care any more because now I have Chrome.
But for some reason everyone has the impression that Chrome is both fast and uses less memory than Firefox, when the evidence points to the speed difference being anywhere from minimal to completely unnoticeable (I recently read a paper which suggested that Chrome's JIT optimizations have a negative effect on overall performance due to their expense). Furthermore, Firefox uses substantially less memory in general.
Extremely effective marketing on Google's part.
Firefox behaves far more gracefully in less regular use cases. With tab groups, switch-to-tab, don't load until selected and tab overflow I can easily have dozens of open tabs without affecting the performance of Firefox and the system too much while remaining quite convenient to use. Mozilla just has to improve the regular use case to be in a better competitive position. Once they've achieved this Firefox will be usable by a far wider range of possible users than Chrome.
Oh, and one of the reasons for Chrome's success (besides the sneaky bundling stuff) is probably the extremely convenient silent updater. I've installed Chrome on many computers which belong to people with little technical knowledge so I wouldn't have to bother with browser updates (users have no say in this) and outdated Flash versions (since it is bundled). Now, the latter reason wouldn't be necessary if Adobe wouldn't be such a bag of fail but that's another topic.
Of course Chrome also has a process per tab (and in fact a few more than that), but the main thing is really a separate UI process (or lockless thread for that matter).
Interestingly this is also what made BeOS so snappy. All BeOS apps require an UI thread that is separated from the rest.
All that to say, while Firefox probably won't get a process per tab, I'd like if they ported the Android UI process to the Desktop.
Chrome does use more memory if you have a ton of tabs open, but it also is still fast. I haven't noticed a substantial amount of memory leakage, but I guess that depends. Regardless, the memory leakage can be subdued by reopening a tab rather than reopening the app.
The marketing that Mozilla puts out is the problem, not Google's marketing.
As it turns out, the optimizations in v8 don't do very much above the baseline JIT except in careful microbenchmarks: https://www.cs.cmu.edu/~ishafer/compilers/files/report.pdf
The difference in speed between the two browsers in real-world code is quite minimal.
Speaking historically, you would say that Firefox 3.5 was as fast as Chrome 3 in real-world use cases? Or that Firefox 4 paralleled Chrome 10? Mozilla has been pushing that they're faster, better, ahead-of-the-curve for years and many people have switched because they haven't delivered until very recently.
Maybe only 10% of that is due to the JIT compiler but you can't easily say Chrome hasn't been faster for an extended period of time since it was released. I'm unsure of whether the remaining 90% is due to DOM interaction, rendering, or just perceived crappiness but it exists nonetheless.
That bug is getting close to being done.
It fixes a lot of crappyness with excessive layout reflows and painting.
You can see how sometimes Gecko will reflow a much larger area than needed by setting nglayout.debug.paint_flashing to true or installing the following addon: https://addons.mozilla.org/en-US/firefox/addon/toggle-paint-...
Notable cases of excessive reflows:
Hovering over the sidebar links in gmail (updates almost the entire page on each hover)
Hovering over "related videos" links on youtube (updates all of the related videos area, area around the video, video description, and comment area)
A few IE test drive tests like BetaFishIE, Santa's workshop, and the CSS maze solver.
When the above bug is fixed, Gecko should be much better in all of these cases.
And I've noticed Chrome hits the disk more often when switching between tabs than Firefox does, which makes my real-world use cases a lot slower.
Ironically, one of the applications that suffers most from this is Google Apps. I'll have calendar, gmail and half a dozen spreadsheets and documents open, move to another room, re-open the Macbook and Chrome dies on all the tabs. Firefox has no problem with this.
The OS X ports of both browsers are a little bit infamous for being iffy, aren't they?
What extensions are you running? Can you disable some of them.
Wrt CPU: are you sure you didn't have flash videos playing in a few of the tabs? :)
Btw, in my limited experience the meme that Chrome uses less memory is false. It just splits it across many processes (and IIRC this was shown recently using graphs and everything) making it harder to infer in something like Windows Task Manager.
Except wrt startup time, Firefox feels as fast (or faster) than Chrome.
Firefox needs to work on two things:
1. Raw startup time
2. speed up loading of awesomebar info after startup: even a simple-minded thing like write out the entire file under a new name every few days will probably defragment the file. it seems like that file gets heavily fragmented leading to long delays to load it. I might be wrong about the root cause.
It gives you a button to defragment your Places database, which might greatly speed up your awesomebar. You can also set it to run automatically at startup after the browser has been restarted X times (by default X is 50, and I'm not sure that I restart Firefox 50 times in a year, so you may want to reduce this).
And each time Firefox has gotten more stable than the last. It's pretty snappy now and I can run it for days on end with no problems.
Also this patch hasn't been applied yet.
Wait a second. Did we say this anywhere this time? Read tfa; does it claim to have fixed "all the bad bugs", or even all the memory leaks?
The headline to this article says that. Sure. But Mozilla did not.
On the other hand on the MacBook I must restart FF regularly, else over 700MB of memory the application gradually slows down and "beachballs" regularly. I don't know what's wrong exactly, because I have all the same extensions.
Out of curiosity, why? You can get 16GB of DDR3 for under $100 these days. The upgrade from 4GB > 16GB and an SSD were huge productivity boosters for me. When you stop worrying about memory management (from a consumer perspective), things are so much snappier.
OTOH my Mac with 2 GB feels slower everyday. Frankly, I simply decided that my next laptop will be a linux PC instead of a Mac, now that there are credible PC alternatives like the Asus Zenbook Prime (a few years ago Mac laptops were so far ahead it wasn't even worth trying).
A few months back I had a 2004 vintage machine with 1GB of RAM and the main annoyance was that firefox was quite long to start up in the morning, and that's about it. Ah, and spamassassin was a tad slow, too, meaning that my emails needed a few minutes more to fetch in the background, no big deal. I switched because the graphic card failed and I hadn't any AGP card anymore :)
Whether it's worth the money is a personal decision, of course. It sounds like the GP doesn't use an IDE for development; I've routinely filled up 2GB even on relatively small projects just with Eclipse.
On MacOSX it always feels like there's not enough ram. Including with Firefox, or maybe especially with Firefox.
2 weeks ago I went from 4 GB to 8 GB (still would love to have more) here at work, because 4 didn't cut it and lead to lots of paging.
Visual Studio (often 2 or 3 instances, grabbing around 300-500 each)
MS SQL Server
OCR Engines (depending on load)
(It just shows a clock and my CPU core temperatures.)
Chrome addons are less prone to breakage and mischief, because Chrome addons target a stable API with a limited set of functionality. Firefox introduced just such an API last year, called the Jetpack API (it may have been renamed since then). You can tell if an extension is using the Jetpack API if it doesn't require a browser restart to install.
Not necessarily. "Traditional" extensions can be extended to support being restartless as well if they implement the necessary hooks.
I wonder how the situation would look today if the MemShrink and Snappy projects had been started in 2009 or 2010 at the latest. My gut feeling tells me that the loss of market share and especially mindshare wouldn't have been as dramatic as it is today. Oh well, I'm happy that Mozilla apparently got their act together and taking the competition more seriously. Right now it's fun looking forward to each next Firefox version. :-)
=> link on google.com telling you have to get Chrome
=> bundling+force install+defaulting Chrome when updating acrobat reader, flash, etc, even from Firefox or IE.
Both work fine as long as Chrome is a decent browser (and Chrome is a very decent browser that's for sure)
They stopped the later and still do the former (it doesn't necessarily show up in all situations so your mileage will certainly vary), any time you go on Google.com with any browser. At least the former is not morally wrong, but it certainly has a huge impact due to their near monopoly on search, and people believing that Google is the Internet and if Google says something, they should probably do it.
I don't think Mozilla could beat neither of those 2 points, even thus they could have lowered the overall impact by doing things better (especially their switch to 6 weeks release without having silent update/auto addon compat, that one was just plain dumb).
And the importance of geek/early adopter/enthusiast users shouldn't be underestimated because these are the ones who often have wide reach (e.g. journalists, bloggers, etc.) or are responsible for how web technologies are used (e.g. developers). It's a bitter lesson the non-WebKit browsers vendors had to learn after most mobile web developers started to target only WebKit because that's the devices/browsers they are using on a day-to-day basis. And in its early days Mozilla thrived on the free guerrilla marketing provided by enthusiast users, not just in their immediate private space but also in magazines, on websites and other outlets where users and authors were constantly praising Firefox for its security, speed and features compared to IE6. Today that place has been mostly taken over by Chrome.
I still having a hard time wrapping my head around how badly Mozilla handled the appearance of Chrome for years. The threat was so obvious from the very beginning and not just in hindsight. As I said, I have the impression that they are on the right track now but there must be lessons to be learned from the 2008 to 2011 period for Mozilla itself and other organizations in similar situations. I wish Mozilla higher-ups would sit together and publish a retrospective about what they perceive they did right and wrong.
That's a whole bunch of extensions.
And not all of those 500 add-ons will be affected, since it only affects add-ons using specific APIs from those old SDKs. And if the cause of that leak is fixed soon, then only users of Firefox Nightly builds will ever have been affected.
Mozilla May Have Plugged Firefox's Memory Leak Once and For All
Posted 07/06/2011 at 8:36am | by Paul Lilly