10 ms·
Mozilla: Are We Slim Yet?
- deleted 15y ago[deleted]
- FooBarWidget 15y agoWhat? People are complaining all the time that programmers become lazier and lazier and make programs more and more bloated as time goes on. Writing efficient programs requires complex tricks. I can't believe someone's complaining about that now.
- hackermom 15y ago"Writing efficient programs requires complex tricks." Says who?
- dthunt 15y agoI think it's more accurate to say that writing efficient program requires some modicum of thought, foresight, or planning. In a rush to put in new features for the past few years they've become the new Winamp of web browsers, stealing the crown from IE. In fact, I think from now on I'm going to refer to mozilla as winamp - until they fix their problems. I'm sensitive to the challenges facing modern browsers. But this bloat isn't (in my opinion) caused by new requirements and features; it's caused by the same type of thinking that allows a dev team to think that it's OK to write programs that require multiple gigabytes of RAM to link. It should come as no surprise that the result is a program that steals half a gig of private space to display a couple static pages.
- nnethercote 15y agoWhat problems? Memory consumption has been trending downwards for over a year now. Have you tried Firefox lately? As for the linking issue, that's a shortcoming in MSVC. Chrome hit the same issue earlier than Firefox did, and switched to a 64-bit linker as a result. Web browsers contain enormous amounts of code because they support enormous amounts of functionality. The code size has only a moderate bearing on the amount of memory consumed at runtime. If you're seeing Firefox using half a GB to display a couple of static pages something is wrong. Likely causes are a busted profile or leaky add-ons.
- dthunt 15y agoIt still takes a gig-plus with the usual linux toolchain (also, it takes HOURS, now). It's not just an issue with MSVC link.exe, even if the linux toolset hasn't hit the critical point yet that MSVC has. The point is that other programs manage to link without this sort of absurdity. Why the hell can't winamp? (making good on my promise, firefox is now winamp) As for busted profiles and add-ons, I don't know what to say to that that's not blatantly offensive, so I'll just offend. Winamp is a fat, ugly, smelly cow. It didn't used to be. Either the web is now a pig-farm, and everybody is writing javascriptish-do-nothing-scripts that allocate hundreds of megs without purpose (in which case, winamp needs to take a leadership role in fixing the javascript problem), or winamp has other serious issues it needs to address. Either way, it's not my problem. Winamp devs can deal with that stuff.
- toomanysecrets 15y agoNot really.
- enneff 15y agoA nice manifestation of the idea "What we can measure we can fix." See also: http://arewefastyet.com/ http://arewefastyet.com/
- exDM69 15y agoOur engineering team's motto is "if you measure it, it will improve".
- RyanMcGreal 15y agoThe funny thing is that it's almost true by default. The mere fact of measuring something is often enough to drive improvements. A couple of years ago, I installed the RunKeeper app on my phone and started tracking how long it took me to walk places. Over the course of a few months, my walking speed increased from a pokey 5 km/h (3mph) to 8 km/h (5 mph). I didn't install the app with the goal of walking faster; it just happened as a side-effect of regular feedback on how fast I was walking.
- decadentcactus 15y agoSame here, with eating. Simply writing down and calculating what I was eating ended up with me eating more (which I'm aiming for). Now measure all the things?
- patrickyeon 15y agoSeems to be the idea behind http://quantifiedself.com http://quantifiedself.com (in case you haven't heard of it before).
- pbhjpbhj 15y agoSee also http://en.wikipedia.org/wiki/Hawthorne_effect http://en.wikipedia.org/wiki/Hawthorne_effect
- RyanMcGreal 15y ago
- DHowett 15y agoI'll admit that I was expecting a site more like http://hasthelhcdestroyedtheearth.com http://hasthelhcdestroyedtheearth.com. It's really nice to see that Mozilla is still taking this stuff into consideration. After all, memory has been a point of contention in the community since Firefox 3 or so. I know the FF detractors are going to come out of the woodwork at any moment, but I feel that reports of Mozilla's death have been greatly exaggerated.
- peterhajas 15y agoRead this last night, agreed. Only now noticed the username :) Do you use it as your fulltime browser? Why is it better than Webkit-powered alternatives?
- wanderr 15y agoI'm glad they are doing this because they need to do something about memory usage, but there are some problems with this approach. -websites change over time. If a site gets redesigned, it'll throw off test results unless they're rerunning the tests on old builds too -this still doesn't capture how users actually use browsers so could miss some serious leaks. What about clicking around on the same site, opening links from the same site in multiple tabs, leaving a tab open for a week, etc? Additionally, they keep saying that extensions are a huge source of leaks. I feel their pain because they don't have that much control over them, but they need to come up with some sort of a solution to deal with it, because let's face it, who's going to run FFx without any extensions?
- buro9 15y agoExtensions should be given an aggressive memory limitation to work with, and a profiler should be made so that extension developers can see what they're using and where it's spent. Constraints are good things.
- ferongr 15y agoFor various reasons this cannot be done for most traditional extensions that introduce advanced functionality (e.g. AdBlock Plus), since they can override the browser's functionality without limitation. Add-on SDK extensions are another matter but those are comparatively very limited in what they can do.
- obtu 15y agoThis can be fixed with a split model. Chromium sometimes introduces fairly ad-hoc APIs (there was one to hook into HTTP requests, first declaratively which was discontinued, then with JS-side filtering which seems to be used by the ABP port); Jetpack add-ons can also use custom modules that hook into the full Firefox API. That way, the part that needs care and auditing for memory/lifetime issues can remain small. https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/reusable-modules.html https://addons.mozilla.org/en-US/developers/docs/sdk/latest/...
- 15y ago
- Kesty 15y agoNot yet, but getting there. Also the bazillion extension that exist for Firefox are not really helping. A "task manager" to be able to keep on eye on all extensions memory consumption (and be able to kill the extension from the browser) should really be helpful.
- pbiggar 15y agoTry about:memory, it's pretty good.
- Kesty 15y agoYeah, it's not really great either. The about:memory page in Firefox is a little bit too technical compared with the about:memory in chrome that is, at least, simple and easy to understand what is going on. In Firefox I still see a lot of memory commited to tabs that I've closed long ago, and can't really get a breakdown of my extensions memory usage. Also what I was wishing is something more like a os task manager. Where I could kill or restart extensions that are using too much memory like I can do to normal applications. Simply stating that this extensions is using too much memory so don't use it (a la IE) won't help. If that extension is the main reason I'm using your browser I'm not going to turn it off. I'm not saying it would be easy or even doable right now, it's just what I wish to see in a future web browser to keep the memory down and prevent me from killing it and restarting it twice a day while working.
- varikin 15y agoI think the point of about:memory in Firefox is not to a task manager, but to allow the developers to know what is going on. If I report a high memory issue, I can copy/paste about:memory into the bug. Now, on the other hand, I have been wanting a real task manager in browsers for years. It was one of the first things that got me excited about Chrome.
- nnethercote 15y agoabout:memory is intended to be a tool for developers and highly technical users. But we're getting close to the point where per-tab memory reporting will be feasible, see https://bugzilla.mozilla.org/show_bug.cgi?id=687724 https://bugzilla.mozilla.org/show_bug.cgi?id=687724, which is currently blocked on some other infrastructure changes. Once that's in place, we can slap a friendlier UI on top, something more like the about:nosy add-on (http://www.visophyte.org/blog/2012/02/04/aboutnosy-is-aboutmemory-with-charts-helps-you-lay-blame-more-easily/ http://www.visophyte.org/blog/2012/02/04/aboutnosy-is-aboutm...). If you're seeing memory for tabs you closed a long time ago, we'd love to hear about it. https://developer.mozilla.org/en/Zombie_Compartments#Reactive_checking https://developer.mozilla.org/en/Zombie_Compartments#Reactiv... has documentation on how to check for these cases. As for measuring memory consumption of extensions, you're about the 1000th person to suggest it :/ New-style ("JetPack") extensions have some tracking, but old-style ("XUL overlay") extensions are really hard to measure, unfortunately. If a critical extension is using too much memory, one option that might be suitable is to create a separate profile. E.g. Firebug leaks a lot (https://bugzilla.mozilla.org/show_bug.cgi?id=669730 https://bugzilla.mozilla.org/show_bug.cgi?id=669730) and some people only need to run it occasionally. Depends on how often you use the extension, of course.
- ticks 15y agoI used to have loads of problems with Firefox, it was so slow... took several minutes to close, it would freeze regularly etc. I got so sick of having to clear the cache every few weeks. Then one day I noticed their hidden profile manager, created a new profile and used it instead. A few months on and everything is still working like it should. No need to clear caches, it quits within seconds, no crashes and so on. It's worth a try if you get something similar. Obviously something was screwed up with my profiles, it took a really long time to delete the old profile.
- cpeterso 15y agoVacuuming your Firefox profile's SQLite databases can significantly improve startup time: http://mozillalinks.org/2009/07/vacuum-your-firefox-databases-for-better-performance/ http://mozillalinks.org/2009/07/vacuum-your-firefox-database... There was a bug request to auto-vacuum profiles after an upgrade, but the bug was closed as WONTFIX: https://bugzilla.mozilla.org/show_bug.cgi?id=395020 https://bugzilla.mozilla.org/show_bug.cgi?id=395020
- starwed 15y agoIf you read that bug, it was WONTFIX'd because they chose a different way of scheduling vacuums.
- wolf550e 15y agoA corrupted sqlite database file could do that.
- dazbradbury 15y agoYep, I used to have a few problems with my addons. Various windows would stop appearing or only partially appear, tree-style-tabs would have funny behaviour. I would assume it was because I was running the latest FF and the add-on hadn't caught up yet... However, simply creating a new profile solved all my problems. Now, any time I run into an issue, I just create a new profile. I know some people will simply suggest switching browser, but nothing handles hundreds or thousands of tabs better than firefox, and I'm not looking to change how I browse the web just to go easy on my browser...!
- fauigerzigerk 15y agoI'm glad they are working on that. Right now I'm not using Firefox because after a day or so typing into a text box starts to stall. I'm not sure it has to do with memory usage, but it has been that way for years on my Mac. Not on Windows or Linux interestingly.
- obtu 15y agoIf it happens after a day or so, memory is certainly a factor. Also, https://bugzil.la/695693 https://bugzil.la/695693 might be relevant, one of the comments explains how to diagnose if this is a reflow bug.
- freehunter 15y agoI do wish there was a good browser I could keep open for weeks and not have to worry about how much memory its using at the end of it. Even on Chrome, using it without closing it for a few days runs me into a lot of memory used. I know a bit of this is used for keeping the history so you can go back or undo closed tabs, but I wish there was a way to make it forget that without closing it (maybe there is?)
- presto8 15y agoTrying blocking Flash by default. I leave my Chrome windows open for long periods of time. After a while, the memory consumption would get out of control. I finally realized that it was Flash that was causing the problem. There are many Flash blockers out there (you can right-click to enable it on-demand as you need it or use a whitelist) and newer builds of Chrome have built-in support for blocking.
- lambada 15y agoNowhere on the page does it say what TP5 stands for. Google has also been unhelpful? Can someone explain?
- guelo 15y agoIt's in the FAQ https://areweslimyet.com/faq.htm#how-is-this-data-generated https://areweslimyet.com/faq.htm#how-is-this-data-generated
- lambada 15y agoActually, even that just used the Acronym without explanation. I missed the link in the 'answer though'. So 'after TP5' means after loading a manually curated list based on the top 500 web pages? Huh, in that case I'm impressed with how Firefox has improved.
- jlebar 15y agoYeah, I don't know what the "P" in "TP" stands for. Maybe "pageset". "T" is for "Talos". It's version 5. Or at least, the previous one was TP4 -- I don't know if there was a TP3. :) > So 'after TP5' means after loading a manually curated list based on the top 500 web pages? Yes. TP5 is a list of 100 pages (based on Alexa 500, I believe, but I'm not sure), and we load the pages 5 times in 30 tabs.
- pbiggar 15y agoAs I recall, T stands for Talos, which is the name of the Mozilla performance suite. TP5 is the 5th version of one particular benchmark which takes pages from the "current" eb (hence the need for new versions every few years). I guess 'P' is for performance, but I forget.
- Tichy 15y agoIs it the same old fallacy that consumed memory is somehow bad? What if they use it for efficient caching?
- hackermom 15y agoBy now I think it's well-known to every Firefox user that in the case of Firefox, the memory used is mostly leakage.
- rpearl 15y agoYes, absolutely. These measurements in the linked article are just a complete and utter lie. Edit: The sentence above is sarcastic. Firefox has had better memory usage than its competitors for a while now, despite the belief that it is leaky.
- nnethercote 15y agoEvidence, please.
- deleted 15y ago[deleted]
- sp332 15y agoI have already found one case in Firefox where this is true. FF will load the image data in background tabs, but it won't decode it (e.g. render a JPG) until you switch to that tab. I may be nitpicking but the extra half-second or so bothers me like texture pop-in in a game. So I go to about:config and set image.mem.decodeondraw and image.mem.discardable to false.
- nnethercote 15y agoTrade-offs exist! How astonishing. From https://wiki.mozilla.org/Performance/MemShrink https://wiki.mozilla.org/Performance/MemShrink: "MemShrink is a project that aims to reduce Firefox's memory consumption. There are three potential benefits. 1. Speed. Firefox will be faster due to less cache pressure, less paging, and fewer/smaller GC and CC pauses. Changes that reduce memory consumption but make Firefox slower are not desirable. 2. Stability. Firefox will suffer fewer aborts/crashes due to virtual or physical memory exhaustion. The former is mostly a problem on 32-bit Windows builds with a 2GB or 4GB virtual memory limit, the latter is mostly a problem on mobile devices that lack swap space. 3. Reputation. Fewer people will complain that Firefox is a memory hog and that Mozilla ignores memory usage."
- Teapot 15y ago"Do i look fat?" It's a trap! If we say 'No' then the bloat continues. And if we say 'Yes you're fat' she runs away crying. And the bloat still continues. Honestly, Yes. You're still fat. But some progress has been made. Keep going. Stop when you hear the first complaint about too skinny.
- jlebar 15y agoYou mean, like "my systems have 16GB of RAM - I want Firefox to use as much memory as possible to speed up my experience."?
- getsat 15y agoThat quote is one of the dumbest things I've ever read on this site.
- DanNeely 15y agoGiven the choice between being forced to restart my browser because it's memory use is approaching the 4GB limit of a standard 32bit process rendering it unusable, despite my having several GB free; and it being able to remain stable by expanding past 4GB I'll take the extra memory usage. Improving memory usage so that my browser never approaches the 4gb point in the first place would be ideal; but based on my personal history I strongly expect that any such gains will continue be eaten by increasingly heavy use on my part and those of sites I visit.
- div 15y agoThis is exactly the type of thing the Firefox team needs to do. Measuring memory usage causes engineers to focus on it. Making the data available piques the curiosity of geeks who historically drive change (in a "you should use this browser" way). Having a few charts comparing with other browsers (chrome in particular) would be a good idea too, especially once they start beating chrome (if ever obviously).
- Mavrik 15y agoI'm just hoping slimming down memory usage won't go at the expense of speed... my systems have 16GB of RAM - I want Firefox to use as much memory as possible to speed up my experience. So if slimming down FF will make my disk trash more, that's the wrong direction to take.
- obtu 15y agoOn Linux at least, the rest of your RAM will be used by the page cache which does a lot to make disk access efficient, and as much as possible bypassed entirely.
- nakkiel 15y agoYep. In other words, using more memory in user space is a sure way of slowding down the system. Specifically PostgreSQL is easily impacted by that as it keeps as little memory for itself as possible and delegates everything it can to the OS.
- nnethercote 15y agoFrom https://wiki.mozilla.org/Performance/MemShrink https://wiki.mozilla.org/Performance/MemShrink: "Changes that reduce memory consumption but make Firefox slower are not desirable."
- fl3tch 15y agoIn an age when most computers come with 4+ GB of RAM, I think people focus too much on memory. Of course there are older computers, but their OS should be using comparably less RAM. WinXP takes up 100 MB at login, so if you only have 1 GB on an older computer, you should still have no problem running modern Firefox. And if you only have 512 MB, it's probably time to upgrade since the web experience that a modern browser can offer you will be crippled by your old hardware. A few months ago I had a conversation with somebody who complained that Firefox used too much memory (about 600 MB). I asked how much he had. He said 3 GB. That seemed more than enough to me, after all Gnome consumes 200-500 MB at login, depending on whether you're using 32 or 64 bit and which shell you're running (Gnome 2, Gnome Shell, Unity, etc). Turns out, Win7 was eating 2 GB at login, leaving him with only a gigabyte for other programs. In my view, the operating system is just a platform to launch other stuff. It shouldn't use more than 25% of your memory. If it does, you should either get more RAM or slim down your OS. If his computer obeyed my rubric, he'd have plenty of room for Firefox. His anger was obviously directed at the wrong problem, but for some reason the OS (and all the crapware which loads at boot and runs in the background, even when it's not needed, consuming precious resources) gets a pass.
- ck2 15y agoComing soon: http://arewesnappyyet.com http://arewesnappyyet.com http://blog.mozilla.com/tglek/2011/12/01/introducing-project-snappy/ http://blog.mozilla.com/tglek/2011/12/01/introducing-project... Part of Firefox 13 and beyond...
- taylorbuley 15y agoYet another a paragon of communications transparency from Mozilla. Here's what we're trying to do (https://areweslimyet.com/faq.htm https://areweslimyet.com/faq.htm). Here's the data (https://areweslimyet.com/ https://areweslimyet.com/). Here's how you can get involved (https://github.com/Nephyrin/MozAreWeSlimYet https://github.com/Nephyrin/MozAreWeSlimYet).
- Erunno 15y agoMaybe Mozilla should consider creating arewetolerantyet.com in the light of Brendan Eich's donations to questionable political campaigns. SCNR ;)
- ilaksh 15y agoThey are measuring and trying to fix the wrong things. I don't care if you think you are 'lean'. The problem is that you have some stubborn devs or decisions that were made a long time ago that need to be reversed but for whatever reason are not being reversed or are hard to change. What I care about is perceived start up time and perceived overall performance. For perceived start up time to improve they have to stop doing some things that they normally wait to finish doing before showing the screen. Like waiting for all of the tabs to load, checking for updates to add-ons, etc. For overall performance to improve I think they need an extra performance mode that will restrict what Addons can do.
- jacobsenscott 15y agoThere's a fix for one of those. Preferences -> General -> Don't load tabs until selected