Firefox On Linux Gets Faster Builds — To Be Fast As Windows
dkd903 writes "Mozilla's Mike Hommey has announced on his blog that his team at Mozilla has finally managed to get the Linux builds of Firefox to use GCC 4.5 with aggressive optimization and profile guided optimization enabled. All this simply means that we can now expect a faster and less sluggish Firefox browser on Linux (both 32 bit and 64 bit systems)."
As a long-time Firefox and GNU/Linux fan, this is excellent news. Whenever I use Firefox on even the most basic windows installs, it's always faster than my desktop running Arch Linux. It lags left and right, sometimes takes forever to switch tabs, but it's not unusable. Thanks Mozilla for remembering that you have a lot of Linux-using fans! :)
"Our country is not nearly so overrun with the bigoted as it is overrun with the broadminded." -Archbishop Fulton Sheen
I loved Firefox for the longest time.
I did. When it came out, it was so light and fast, that it put it's predecessor the Mozilla browser to shame. It was no contest. I even went so far as to buy the T-shirt, and go out of my way to enlighten every non techie friend I possibly could about it.
Over the years, Firefox got slower as my computer got faster. A lot slower, but I had to keep the update cycle going on my machine because for the most part... I didn't really have a choice. Today, Firefox on Ubuntu is almost totally unusable. It sucks up 99% of my system resources when I have two gmail windows open, it's always processing weird network requests, and it's so incredibly slow that I just don't feel like I want to have anything to do with the browser anymore.
Meanwhile, Google Chrome has added a Bookmark manager, and Firebug is available. Chrome also gets very regular updates from Google, and even with every possible stupid extension I like, it doesn't slow down. Granted, half of my extensions don't work right, and that's annoying, but the browser itself does what I want, at the speed I want it.
I really think Firefox has missed the boat here.
I might change my mind, but I'm in absolutely no hurry to try it out (as a web browser, it's a marvelous sqlite tool) again.
You may now gaze upon my greatness.
Microsoft Internet Explorer is clearly superior in every way.
Especially on Linux. :-)
The Tao of math: The numbers you can count are not the real numbers.
I've been using Linux long before than even Firefox existed, but I don't remember downloading Firefox from their website (so their builds) for Linux since it was the de-facto browser of choice of Linux desktop. I believe most users of Firefox on Linux use build of their distribution. Not to mention that also means couple of millions less for their download count.
Though, maybe their way of doing it or updates in makefiles help maintainers of distributions to put better builds. I guess that's what matters, not their own build on web page.
Look dude, Get your complaints right. You're bitching about Memory Footprint. Perfectly acceptable problem to bitch about.
You're not bitching about memory leaks. Memory leaks would be indicated by progressive increase in the amount of memory used over time, without functional changes is your usage of the app. That's not what's indicated by my tests on both Windows and Mac. I run with many tabs open, and FF's memory usage is directly related to the number of tabs I have open. When I shed a window or a set of tabs, FF shrinks in memory footprint.
If you were bitching about memory leaks, that would be a perfectly reproducible problem, and a standard memory profiler would catch these things, and any contributor to FF could easily submit patches to clean up the leaked memory. Memory bloat is a more systematic problem that is much harder to keep a handle on. No matter what, new features need memory to work, so as an application ages it would be prone to increase it's footprint. That's the hard problem, and that's what I think the FF team should take some time to focus on, now that they are reaching acceptable responsiveness in general.
Gravity Sucks
Linux does not suck at 3d proprietary drivers suck at 3d.
Wow.
I've experienced FF using over 2G of memory after some use. Who should I blame? I spent several hours to narrow it down to greasemonkey, though I'm still not sure which script.
Complaints about memory leaks will persist, even if caused by the plug-ins and extensions. Rather than dismiss and ignore the complaints it would help the overall user experience to if it were easy to identify the cause---a "standard memory profiler" may catch leaks in a (dev?) firefox build, but there's no convenient way to figure out which plug-in is causing an actual user problem, let alone where the leak comes from within a plug-in. Asking users to perform a binary search disabling plug-ins is ridiculous---an option that showed how much memory each plug-in is using would at least easily allow blame to be allocated appropriately.
That's a good point. As we've been sandboxing things into separate processes (re: flash), it would be great if the allocator for XUL were patched so it could know which plugin is producing/using what memory. [I'm imagining "allocateWithZone" from objective-c] Then, you could have a clear panel which would indicate which subsystems are consuming more and more memory. This would allow us to point at various builds of greasemonkey (from your example) or firebug or other "fluffybunny" plugin. Further, we'd have extra data for FF crashlogs that would tell us which plugin was truly at fault in a crash, not just what thread did the crashing, but if a plugin-zone had consumed a gig of ram by itself.
Gravity Sucks
I think that the lack of guided optimization on gcc is a fair indication that Microsoft offers a better compiler, but I also think it's a long way from "gcc lacks an option that helps Firefox" to "Linux is for masochists". Seriously, Firefox scored better on some JS benchmarks on Windows than it did on Linux, but that doesn't make the Linux version unusable or painful.
Anyway, many of us don't use GNU/Linux because it is unfailingly better than alternatives, but because we have an understanding of and appreciation for economic and intellectual liberty which is better served by GNU systems. We regard the use of proprietary systems to be masochistic.
It appears you haven't heard about the new Firefox release schedule.
https://www.mozilla.com/en-US/firefox/channel/
Firefox 4 is the stable channel
There is no beta build currently
Firefox 5 is in the Aurora channel
Firefox 6 is in the Nightly channel
Install FF 4, browse a while, close all but one _blank_ tab and guess what? Firefox uses 7-800 MB _active_ memory.
Hi, I'm a Firefox dev. That sounds very bad. Can you please give some more details about how to reproduce it: Are you using a new profile? Are there any addons and plugins installed? What websites do you visit? And what specific Linux distro are you on?
Note that this might not be a bug: For example, if you visit a website that shows 200MB of images, then close that tab, then the memory is not necessarily freed. The reason is that the page stays cached, so that if you do 'History->Recently closed tabs' and open it, it will appear quickly. On a machine with lots of memory (most these days), that behavior tends to work better than releasing pages aggressively. However, if you aren't visiting websites with extreme memory use like that, then this might be an actual bug.
Getting back to your problem: With a new profile and no addons or plugins, we are unaware of a bug that causes anything like that. So I would be very grateful to you if you can point us to a bug we don't know about, so that we can fix it. If you give me steps that I can use to reproduce the problem (on my Linux machine over here),then you have my promise that I will l personally look into this and do everything in my power to fix it.
Does that mean they weren't using a profiler before now?? That... actually explains quite a bit...
No, we use profilers ;) In fact we have some valgrind - the awesome Linux profiling tool - devs working here.
Profile guided optimization is something else though. It is a special way of compiling and linking, that the compiler and linker use profiling information to know how best to optimize the code. So code that is used a lot is compiled with -O3 (the most optimizations), while code that is not used a lot gets -Os (to take less space), and so forth. This is a very useful technique that was not available on Linux until last year, and the news today is that Firefox now builds properly with it and there is a nice noticeable speed improvement for Linux users.
There is this video card called the "Voodoo" which has decent 3D acceleration on linux and there is also one called the "Matrox Millenium". I've got no idea how you managed to get hold of Firefox in 1996 or managed to get your posts on Slashdot to us in 2011 but please stop bothering us here in the future about problems already solved back in your time.
Also sorry to disappoint you, but we don't have flying cars yet.
Please mod this man up. These trolls need to be put to rest; if a bug as severe as that one actually existed, it would have been fixed a long time ago.
"Our country is not nearly so overrun with the bigoted as it is overrun with the broadminded." -Archbishop Fulton Sheen
Then it's good that Firefox uses less memory than other browsers.
What a fool believes, he sees, no wise man has the power to reason away.
Thanks for the valuable feedback to the OP. Comments like this keep me coming back to Slashdot.
Out of curiosity, is there an option to turn on aggressive releasing of pages? It seems to me to be a good idea, but without being familiar (even remotely) with the source code and design perhaps there are reasons against this (if there is indeed no option to turn it on/off).
Cheers
You can simply tell Firefox to not cache anything by setting browser.sessionhistory.max_total_viewers to 0 in about:config. Then once you browse away from a page, it's memory will all be released. More details here
The problem with this is that pressing 'back' will mean a complete reload of the page you just left. At least in my experience, caching pages is almost always worth it (unless you have machine with very limited RAM).
AdBlock and Firebug are both know to cause memory problems in some cases. I believe this will, at least in part, be fixed in Firefox 4.0.1 - which was launched the other day I think (maybe you already updated to it). But even so, they are good first suspects. Firefox lets addons modify a lot of internal things, which makes useful addons like AdBlock and Firebug possible, but also gives them the opportunity to (easily) create memory leaks.
In general, though, my best suggestion would be to see how things are without *any* plugins or addons. Simplest way is to create a new profile, and disable plugins and addons in it. Then browse for a while and see how things are. Odds are, you won't see strange memory behavior, and then the question is, which addon or plugin it is, and you can reenable them one by one til you find the guilty one.
Long-term, most addons will probably become Jetpack addons, which is a model similar to Chrome's. That kind of addon is more limited in what it can do, but also unable to cause memory leaks. Aside from that, we are moving to a one process per tab model, also like Chrome, will will help narrow down which page is responsible for large amounts of memory being used, when that happens. In the short term, though, problems like yours are almost always caused by addons or plugins, and I apologize for the hassle, the best thing to do is to find which it is, as I said earlier.
Linux does not suck at 3d proprietary drivers suck at 3d.
Yeah, that's exactly why the #1 3D driver recommended by Firefox devs for things to work smoothly is NVidia's proprietary driver...