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)."
The optimisations will be enabled in Firefox 6... is that the version that comes out this week or the week after?
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
Microsoft Internet Explorer is clearly superior in every way.
Acceleration works just fine depending on the drivers. Nvidia proprietary is going great, though I'm not sure about Intel. ATI Isn't even in the game. But yeah, ever since Flash 10.2 & the more recent major Chrome revisions, no more 2FPS flash video on a netbook! Haven't exactly been following FF but yeah...
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.
Most extensions don't work yet, which is expected. Although, AdBlock, NoScript and WoT surprisingly work.
Kudos to the Mozilla team for their brilliant browser.
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.
Chrome is excellent on Linux. FF definitely more sluggish.
which is totally what she said
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.
No matter what, new features need memory to work...
Stop being reasonable. Immediately. If Firefox didn't have so many damn features, it wouldn't take up so much memory. Then the parent could whine that FF doesn't have enough features.
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.
I'd call you a troll, but some people do have this issue.
For me, however, I have way better luck on Linux than anything else.
Running this stress test: http://demos.hacks.mozilla.org/openweb/HWACCEL/
gives me: 450fps* in FF 6.0A1(latest nightly), 45fps in Reconq, and about 30fps in Chrome!
(*Note: Set minimum timeout to 0 in ff prefs, also remove the two lines of code in the above test that limit the output number to 60fps)
Compare this to about 22fps on Windows XP on Firefox on my fathers machine, which is almost as powerful as mine(Phenom x4 3.2ghz vs. Phenom II x4 3.5) - No HW acceleration there.
So yea, I like Linux. I upgraded to it from XP a few years back and am loving it.
I don't know why, but I don't experience these problems. Perhaps I don't have enough Greasemonkey scripts. /tmp/, which has been mounted to a tmpfs(ram-backed fiesystem). /much/ memory as they can, so I get better performance. /not/ use it?
I mean, I typically end up with around 1.5gb or so of total system usage with:
1. 50 FF tabs open and loaded
2. FF given a memory cache of 1GB to play with
3. Firefox's disk cache symlinked to
And I don't care!
See, after getting 4gb of ram, and having like 6 more in swap, I don't worry about memory usage: I want things to use as
Sure, on a phone with 256mb, you want things to be as lightweight as possible. On a new system with 4+ gb of ram? why
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.
See, after getting 4gb of ram, and having like 6 more in swap, I don't worry about memory usage
The problem is, that's the equivalent of saying "There's no problem with the software. The user should just throw money at the issue and upgrade his/her system."
Even Mozilla's recommended system requirements indicate 1/8th the amount of RAM you have.
We can't daydream and imagine we can acceptably run modern websites, let alone 50 tabs of them, on decades-old machines. But if the developers themselves are recommending 512MB, then the user should have an acceptable experience at 512MB, not 4GB.
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).
That sounds normal to me - going from 178MB to 223MB isn't unexpected. You probably have several pages cached, each taking a few MB. That, and things like the JS heap 'settle' on a slightly higher amount of RAM soon after load (and stay there), as they keep allocated pages held to not waste time reallocating them later. There is also some effect of memory fragmentation (which makes more memory appear to be allocated than has been).
An interesting comparison would be, to load those exact pages in Firefox and a few other browsers. They will probably show similar memory behavior, but if they don't, please let me know!
If you prefer to change that behavior, it's easy to do - change browser.sessionhistory.max_total_viewers in about:config to 0. Then it won't cache pages. You will have slower loading of pages when you press back, restore recently closed tabs, etc., but if you would rather save that memory then that's cool.
In my personal experience, and also in surveys of Firefox users, the caching is almost always a good thing - it does not lead to any system slowdown, and does speed up the responsiveness of the browser. But that doesn't mean it's what everyone wants, and maybe your browsing habits are in a way that caching isn't a good idea - so the caching is configurable.
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.
I think that the lack of guided optimization on gcc is a fair indication that Microsoft offers a better compiler
Maybe I've misunderstood your meaning, but wasn't the whole point of this article that with a newer gcc you can use guided optimization and link-time code generation ?
Maybe its just because I use MSVC and gcc every day, but when MSVC lacks even C99 support I find it hard to call it a "better compiler".
-Malloc
___________________ I want to be free()!
I've had FF hit over 1.5Gb RAM after around 6 to 10 hours, even though I close tabs and only have on average 5 open. Do I know why FF does that? Nope, but I do know that Chromium based (Comodo Dragon) don't do that, so that is why I've been switching. I just fired up FF 4 to type this out and I can literally watch the CPU usage go up as I type. If I type fast enough I can even hit over 60% on the 1.8Ghz Sempron I use for a low power nettop. Hell just sitting here doing nothing it is using 24% CPU, that's just nuts. I also have been running it less than 5 minutes with 3 tabs open and am already over 300Mb, and we are talking about /. set to classic mode. Again just nuts.
So yeah, it ain't just him. Since FF 3.6.x things have been going downhill for me on the low power machines, and FF 4 is nearly unusable. Not using any weird extensions either, just ABP, NoScript, and ForecastFox.
ACs don't waste your time replying, your posts are never seen by me.
Like Atari says - you should keep up with the times, and get an Nvidia graphics card. I was an ATI guy for years, but ATI has fallen by the wayside for lack of support on Linux.
"Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it." - Charlie Br
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...