Live data from Hacker News

Mozilla: Are We Slim Yet?

areweslimyet.com

51–60 of 101 posts

Re: Mozilla: Are We Slim Yet?

#51
post #25
post #8

Earlier quoted context omitted.

Extensions 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.

For 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.

This 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/...

Re: Mozilla: Are We Slim Yet?

#52
post #36

I'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.

From https://wiki.mozilla.org/Performance/MemShrink: "Changes that reduce memory consumption but make Firefox slower are not desirable."

Re: Mozilla: Are We Slim Yet?

#53
post #45

Earlier quoted context omitted.

By now I think it's well-known to every Firefox user that in the case of Firefox, the memory used is mostly leakage.

Yes, 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.

Evidence, please.

Re: Mozilla: Are We Slim Yet?

#54
post #18

Is it the same old fallacy that consumed memory is somehow bad? What if they use it for efficient caching?

Trade-offs exist! How astonishing.

From 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."

Re: Mozilla: Are We Slim Yet?

#55
post #8
post #7

I'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…

Extensions 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.

Even if a per-extension memory limit was possible, good luck choosing the actual limit and then surviving the storm of "WTF did Firefox kill my extension?" complaints.

Re: Mozilla: Are We Slim Yet?

#56
post #18

Is it the same old fallacy that consumed memory is somehow bad? What if they use it for efficient caching?

Trade-offs exist! How astonishing. From 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 su…

I am not a specialist on that stuff, but I note the "will". If they have launched and noticed actual improvements, I'll be interested.

Re: Mozilla: Are We Slim Yet?

#57
post #36

I'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.

In 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.

Re: Mozilla: Are We Slim Yet?

#58
post #35
post #23

Earlier quoted context omitted.

Try about:memory, it's pretty good.

Yeah, 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.…

about: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, 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-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#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) and some people only need to run it occasionally. Depends on how often you use the extension, of course.

Re: Mozilla: Are We Slim Yet?

#59
post #56

Earlier quoted context omitted.

Trade-offs exist! How astonishing. From 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 su…

I am not a specialist on that stuff, but I note the "will". If they have launched and noticed actual improvements, I'll be interested.

nnethercote on the other hand is the "specialist" as he is in charge of the MemShrink project itself... I would trust him on this stuff.

Re: Mozilla: Are We Slim Yet?

#60
post #36

I'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.

> So if slimming down FF will make my disk trash more, > that's the wrong direction to take.

We explicitly don't want to cause this.

When we reduce the number of nodes in the live object graph, our garbage collector and cycle collector run faster. This results in shorter stop-the-world pauses when we collect.

This isn't the only thing we've done as part of MemShrink, of course, but it's an example of how reducing memory usage and running faster aren't always at odds with each other.

Post reply on HN