|
|
Log in / Subscribe / Register

The Fennec browser for Android

There is now a "pre-alpha" version of the Fennec browser available for Android 2.0+ platforms. It comes with a number of caveats - when a Firefox-based browser has explicit warnings about memory use one should pay attention - but it should be an interesting thing for adventurous users to test.

to post comments

The Fennec browser for Android

Posted Apr 28, 2010 13:53 UTC (Wed) by kripkenstein (guest, #43281) [Link] (21 responses)

> when a Firefox-based browser has explicit warnings about memory use one should pay attention

I guess that's a joke, but it perpetuates something false but commonly believed. Since Firefox 3.0 (or before, even), Firefox memory use is very reasonable - at least without extensions (but if they mess things up, blame them). In fact Firefox will use *less* memory than say Chrome, because of Chrome's one-process-per-tab model (it's a good model for lots of reasons, but memory isn't one of them, as the Chrome team readily admits).

Memory use

Posted Apr 28, 2010 14:07 UTC (Wed) by corbet (editor, #1) [Link] (15 responses)

Things have certainly improved, but I still end up restarting Firefox every now and then so I can get my memory back.

Memory use

Posted Apr 28, 2010 14:13 UTC (Wed) by jwb (guest, #15467) [Link] (14 responses)

I think what kripkenstein is getting at is that Firefox is much more efficient in memory than any other browser. Maybe it's not as efficient as some imaginary ideal, but it's very good.

http://www.favbrowser.com/browser-memory-ram-usage-firefo...

Memory use

Posted Apr 28, 2010 15:22 UTC (Wed) by alankila (guest, #47141) [Link] (2 responses)

While the graphs you linked do look impressive, I'm not convinced. It takes almost no time to get Firefox to exceed Chrome's memory usage here, just reloading the same page does the trick. While the 'fox 3.6.3 starts off in impressively small 20 MB, merely loading the google.fi start page some 50 times got it to 41 MB. Actually using it to browse a couple of sites got me further yet.

In the meantime, the Chrome browser window sits fixed at 30 MB. This is Chrome 5, though, maybe Chrome 3 was far worse.

Memory use

Posted Apr 29, 2010 20:30 UTC (Thu) by oak (guest, #2786) [Link] (1 responses)

> While the 'fox 3.6.3 starts off in impressively small 20 MB, merely loading the google.fi start page some 50 times got it to 41 MB.

What extensions you have active?

JS code can also leak (keep references to objects that the code wouldn't need anymore etc) if you keep the same page open or reload it (when you close the page, FF should be able to get rid of the memory usage). If you know good (or any open source) tools to analyze JS objects memory usage, I would be interested.

> Actually using it to browse a couple of sites got me further yet.

What kind of page caching settings you have enabled in Firefox?

Memory use

Posted Apr 29, 2010 21:03 UTC (Thu) by alankila (guest, #47141) [Link]

There's some "Java Console" extension, it probably came with jdk. I use the default settings otherwise.

It is possible that Firefox just suffers from some kind of memory fragmentation. Opening and closing empty tabs grow the process for a while until it stops growing, then pressing reload for a while and going back to open/close routine keeps on growing it. When that doesn't work, I reload some different site like lwn.net a couple of times and it starts growing again.

That being said, 73 MB seems to be pretty stable kind of value. Maybe there are memory pools that are shrunk when they exceed certain size and all I am seeing is the slow accumulation of objects in the various pools. Without knowing the details, hard to say more.

Memory use

Posted Apr 28, 2010 16:36 UTC (Wed) by iabervon (subscriber, #722) [Link] (7 responses)

That's on Windows; Linux has very different attributes for the case of a process forking many times, based on very different expectations as to the importance of many processes needing the same read-only (or not-yet-written-to) content in memory. So it does mean that you shouldn't use Chrome on your Window-based phone, but doesn't really say anything about the relative suitability of browser engines for Android.

Memory use

Posted Apr 28, 2010 17:22 UTC (Wed) by drag (guest, #31333) [Link] (6 responses)

Yeah... In Linux starting a new process from a existing one is a very very 'lite' affair. It's very fast and copy on write kicks in so that if you have a one instance of chrome or a dozen instances of chrome the memory overhead is very small.

And browsers are fairly unique is that besides the application data most of the actual memory is used in the rendering and display of web pages, which is going to be unique to each webpage instance... so that you have little advantage by being able to share memory directly between threads or even multiple pages rendered in a single process versus a dozen separate processes each rendering their own.

It seems to me that the particular people that originally developed the architecture were heavily influenced by Linux way of doing things and were probably involved in Google's other uses of performance-sensitive uses of Linux.

Not to also mention that Firefox in Linux sucks compared to Firefox in Windows. Even so much so that Firefox running in Wine is able to outperform Firefox running in native Linux in the past.

Memory use

Posted Apr 28, 2010 17:56 UTC (Wed) by tzafrir (subscriber, #11501) [Link] (1 responses)

So if memory sharing is so little, why does the better copy-on-write on Linux so useful?

The answer was already given, you know...

Posted Apr 28, 2010 21:09 UTC (Wed) by khim (subscriber, #9252) [Link]

So if memory sharing is so little, why does the better copy-on-write on Linux so useful?
And browsers are fairly unique is that besides the application data most of the actual memory is used in the rendering and display of web pages, which is going to be unique to each webpage instance...

Browsers initialize huge and very complex libraries at startup and then produce mostly unique data in each browser copy. So if you don't have CoW you duplicate a lot of data which does not even change but if you have CoW then you waste just slightly more memory then single-process browser.

In reality the picture is not so rosy, of course, but yeah, Chrome architecture makes wastly more sense for Linux rather then for Windows...

Memory use

Posted Apr 28, 2010 20:28 UTC (Wed) by bersl2 (guest, #34928) [Link] (2 responses)

>Not to also mention that Firefox in Linux sucks compared to Firefox in Windows. Even so much so that Firefox running in Wine is able to outperform Firefox running in native Linux in the past.

Why might this be?

Memory use

Posted Apr 28, 2010 21:07 UTC (Wed) by DOT (subscriber, #58786) [Link] (1 responses)

I think it has to do with profile guided optimization, which isn't performed for the Linux build.

Memory use

Posted Apr 29, 2010 16:16 UTC (Thu) by Trelane (guest, #56877) [Link]

Some interesting Moz links on Linux startup performance which may be related:
http://blog.mozilla.com/tglek/2010/03/24/linux-why-loadin...
http://blog.mozilla.com/tglek/2010/04/12/squeezing-every-...

Memory use

Posted Apr 28, 2010 21:53 UTC (Wed) by nix (subscriber, #2304) [Link]

I suspect, given the age and competence of the people who developed Chrome, that they were influenced by Unix first, Linux second. It's not as if CoW is a uniquely Linux thing: Unix has worked this way almost forever.

Memory use - be careful....

Posted Apr 29, 2010 0:34 UTC (Thu) by jg (guest, #17537) [Link] (2 responses)

Ok, if you have little or no swap, then Firefox is the current winner, hands down. This is very important on limited embedded or close to embedded systems such as OLPC.

Even so, you need to be very careful on your comparisons with Chrome, not to count shared text usage multiple times, and similar effects.

But it's much more subtle as well.

Total memory usage is one aspect; but what the realistic working set of the browser is is also extremely important, and whether typical use causes memory pressure to evict other things out of RAM that you'll need.

If the browser's allocator has scattered little references all over its address space that it needs to reference frequently in lots of circumstances, then it can push other things out of RAM you really need, causing really sluggish behavior whenever you start using something other that the web browser, that has had its memory pushed out.

Chrome's process model at least means that each tab is in a separate address space and shares memory allocation "fate" only with itself (to first order). Which means that fragmentation problems may be much less an issue; and when you throw away a tab, closely associated items all get freed in a nice fashion. So guaranteeing lots of related items are where they can be throw away all together has lots of goodness from a system "feel" point of view, if you have insufficient RAM. I note there are tabs I don't reference for many hours, and then close; they can be easily thrown away without having to touch the whole address space in use.

Now, maybe we should all reimplement a browser in a real garbage collected language (with a proper real time incremental garbage collector, and one that is smart about what tab references what memory), and be done with this all. But both Webkit and Gecko are unfortunately in C++, and life is hard managing memory in those environments. I'm sure glad not to have to worry about those problems.

Sigh....

Exactly how this all sorts out is unclear to me: I'm just pointing out the real behavior to the user depends very much on the application mix and the platform; not simply single numbers from artificial benchmarks.

So far, on a conventional laptop using chrome, I've very happy; it doesn't seem to have caused the memory pressure problems that old versions of Firefox caused frequently (and the resulting paging storms).

In short: it depends, and it's complicated....

Memory use - be careful....

Posted Apr 29, 2010 3:32 UTC (Thu) by jwb (guest, #15467) [Link] (1 responses)

When Gecko switched to jemalloc they tackled a really hard problem that Safari and Opera have yet to face down, which is the fragmentation you mention. Chrome, somehow, is doing a lot better in this regard because it does not grow over time like Safari and Opera do.

To all the other posters, my link wasn't presented to make fun of Chrome. I think it's great that Chrome uses system resources fully, and then releases them. What's not great is the unbounded linear growth of Safari and Opera.

Memory use - be careful....

Posted Apr 29, 2010 7:55 UTC (Thu) by nix (subscriber, #2304) [Link]

Of course Chrome is doing better in this regard. Doing almost all the work in relatively short-lived per-tab processes means that memory fragmentation isn't going to be an issue no matter what allocator those tabs use.

The Fennec browser for Android

Posted Apr 28, 2010 15:43 UTC (Wed) by proski (guest, #104) [Link]

The story says it's a debug build. I don't think comparisons made with a production build on a different architecture are relevant at this point.

The Fennec browser for Android

Posted Apr 29, 2010 3:24 UTC (Thu) by k8to (guest, #15413) [Link]

I kind of laugh at the memory requirements of all browsers these days.

Admittedly, the web has gotten very complicated, but I'm still unimpressed with how much ram it takes to present a glorified hypercard.

The Fennec browser for Android

Posted Apr 29, 2010 11:56 UTC (Thu) by rsidd (guest, #2582) [Link] (2 responses)

I think the complaint is not memory usage on startup, but memory leaks. I'm convinced firefox still has them: if I leave it open long enough it becomes unusable.

The Fennec browser for Android

Posted Apr 30, 2010 2:10 UTC (Fri) by jg (guest, #17537) [Link] (1 responses)

Actually, there can be leaks elsewhere: e.g. a bug in an X driver can cause the X server to lose memory as pixmaps used by a browser come and go.

And applications can have bugs in which they lose track of pixmaps they've created in the X server. In this case, the bug is in the application though its symptom is the X server using more memory. If chrome is using multiple connections to the X server (which is probably how I would do it) that would help as well, as when you throw away a tab and close the X connection, the pixmap storage would also get freed. I should go check, but not tonight.

And funny long term allocations of X resources could fragment memory in the X server as well, though its job is likely easier than that of a browser to manage.
- Jim

The Fennec browser for Android

Posted May 3, 2010 18:41 UTC (Mon) by dlang (guest, #313) [Link]

It's true there can be leaks anywhere, but my experience is that if I leave firefox running for a long time (typically weeks to months on my main home and work systems) it ends up eating a huge amount of memory, and exiting and restarting firefox makes the system work much better.

this sort of thing points the finger pretty firmly at firefox.


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds