

Getting snappy – performance optimisations in Firefox 13 - robin_reala
http://hacks.mozilla.org/2012/05/getting-snappy-performance-optimisations-in-firefox-13/

======
AndrewDucker
I know there was a big fuss when Firefox moved over to the rapid release
model, but it really seems to have energised the developers. We're seeing a
lot of improvements in areas that never seemed to get the love before, and I
suspect that knowing the users will get their hands on your changes in 6 weeks
is responsible for a lot of that.

~~~
gcp
_We're seeing a lot of improvements in areas that never seemed to get the love
before_

Mozilla started increasing its paid staff about 1.5 year ago and it almost
doubled. Most of those people are now well worked in. It would have been sad
if there was no user visible improvement. (Of course, not all new hires went
to desktop Firefox with critical projects like B2G starting etc)

Increasing the release schedule coincided pretty well with that in getting the
new work out faster, too.

------
driverdan
I love that FF is focusing on performance. FF startup time used to be really
annoying but is it that important anymore? Do people actually close their
browser?

Unless I encounter memory leaks or similar problems the only time I open my
browser is when I restart my computer, which is at most once a month.

I'm curious if this data exists. Is there data on how often people close /
open their browser?

~~~
CWuestefeld
I leave my browser open always, only closing it to clear out the memory leaks.
So start-up isn't terribly important to me.

My FF opens pretty quickly by my standards. What seems to take forever is
_closing_ it. It seems to me that there ought to be some performance
optimizations to be found in that area.

~~~
pcwalton
Are you using Readability? There was a recent change made to fix massive
shutdown hangs when using that addon (or others that use FUEL):

<https://hg.mozilla.org/mozilla-central/rev/139e8e845aa5>

------
SeanDav
I am heavy user of browsers and I have never noticed any difference in speed
between Firefox, Chrome and for that matter IE in terms of my normal browsing.
I usually have several browser windows open and sometimes over 100 tabs or
more. Firefox wins hands down for its vastly superior tab handling and addon
infrastructure.

Speed, for me, just has never been an issue.

~~~
wvenable
I'm a die-hard Firefox user; can't live without tab mix plus but Chrome is
significantly faster rendering my web application than Firefox or IE. We
recommend it to all our customers for that reason -- the difference is
striking.

Our application is not JavaScript heavy but it does contain a lot of HTML.

~~~
Derbasti
I switched from Chrome to Firefox a few weeks ago. Yes, Chrome is noticeably
faster for every rendering task. In particular, it's nice that single tabs
don't slow down the whole browser.

In the end though, both work fine and I don't mind the difference in speed too
much.

~~~
wvenable
Why the switch? I don't imagine there are too many people switching from
Chrome to Firefox. I simply can't live without the features I've gotten used
to, but if I didn't know any better I'd probably just stick with Chrome.

~~~
Derbasti
For some reason, my main Chrome installation broke (kept resetting itself
every few days). Also, I became fed up with sending all my settings, bookmarks
and history to Google.

So I tried Opera. It had a few quirks which ultimately threw me off too much.
Hence, Firefox. It does not annoy me (much). That is all I ask from good
software.

Also, Firefox syncing is quite amazing.

Divorcing myself from Google is still in progress though, with maps and
calendar being the last holdouts.

------
AshleysBrain
Anyone know any more details on what's actually different about the cycle
collector?

~~~
mccr8
I work on the cycle collector. The basic idea of a cycle collector is to trace
through suspicious objects to find ones that can be freed. If you can tell
that an object is alive, then you don't need to trace through it. There was
already some support for this (if a DOM object is in a document being
displayed, it must be alive), but we've added support for many other common
cases (for instance, if a JS object is reachable from a DOM object that is in
a document that is currently being displayed, it and all JS objects reachable
from it must be alive).

This is mostly a process of logging what the cycle collector is looking at,
then trying to figure out if there are reasons why particular objects are
always alive that we could take advantage of. The most common cases have been
taken care of in Firefox 12 and 13, so we're left with a variety of little
cases. This results in exciting bugs with names like "unmark gray objects held
alive by nsXBLDocGlobalObject of skippable nsXBLDocumentInfo" (
<https://bugzil.la/735550> ).

The bug grayrest linked to has a good list of them, as well as one of its
subbugs ( <https://bugzil.la/716598> ).

~~~
AshleysBrain
Thanks for the info!

------
sheldor
It's great that FF is advancing in performance terms and slowly closing the
gap with Chrome.

However, the big pain is the memory leaks caused by the addons (namely
Firebug) which make the memory climb to 2 gigs after 4-5 hours of development.
I guess they should be focusing on these issues too, since some of them are so
popular, that users prefer FF thanks to them (like the aforementioned one).

~~~
mccr8
In fact, we have recently fixed a common source of addon memory leaks:
[http://blog.kylehuey.com/post/21892343371/fixing-the-
memory-...](http://blog.kylehuey.com/post/21892343371/fixing-the-memory-leak)
The version containing this fix is scheduled to be released in August, I
believe.

------
nextparadigms
From a user experience point of view, I find that Chrome's pre-rendering of
pages when you start typing them is a big deal for me now. Sometimes it makes
a big difference on how fast you perceive the page to load - it loads
instantly. Mozilla might want to copy that feature or do something similar.

------
hrabago
I don't agree with the browser-on-demand solution, and while I'm glad I can
turn that option off, I don't think it goes far enough. What I want is for
background tabs to be loaded after the current tab, and done in such a way
that doesn't disrupt my current browsing activity. Maybe load them one at a
time after the current one is done rendering.

------
Derbasti
> Firefox start-up time is visible to all users.

Really? Except for OSX users that is. Still, improving startup time is a good
thing.

------
chmike
The reason I prefer using chrome than firefox is that I get freeze when
viewing a video. I don't see them with chrome. But I prefer firefox's
management of memorized passwords.

------
idleloops
Noticed the 'tabs-on-demand' feature a few weeks back in Nightly. That's a
great feature, that should have been in there earlier.

You can turn this behaviour off as well. I'd like to see perhaps the option to
turn it off on an individual site basis. Or perhaps set a default value of off
for pinned tabs (I haven't tested, the behaviour of pinned tabs.)

~~~
ithkuil
I have the feeling that in the beginning, the idea of preserving your tabs was
precisely because you wanted them to be prerendered. Then it became a way to
have some sort of "front line bookmarking"

~~~
MatthewPhillips
I feel like browsers have failed to innovate on bookmarks. The problem with
bookmarks is that once you have too many they become unweildy. There should be
a separate between "stuff I visit a lot" and "this great article about Early
Modern Spain that I want to read later". I'm glad that Safari is delving into
the latter a bit now.

~~~
gcp
Unsorted bookmarks + Awesomebar in Firefox works great for that. It's search-
inside-bookmarks is great.

