Snappy #40: Faster tabswitching, startup analysis

This was an interesting week. On one hand all performance aspects of tab strip work were suspended until end of year on the frontend team, on the other impressive gains were made on platform side of things.

Jeff Muizelaar cut tab switch times in half

Data came in on Jeff’s optimization I mentioned last week: bug 792199. This halved our median tab switch time. Since this also landed at the end of our 18 cycle, a comparison between 18/19 Nightlies gives us an idea of how this changed our tab switching times overall. Note the actual difference would be greater since both 18 & 19 include data points with Jeff’s patch, but the majority of data in 18 is without Jeff’s patch.

Black: v18, Blue V19. X-axis represents time in milliseconds to do a tab switch, excluding time to paint.

Above graph shows a shift towards fast tab switch times across the board with particularly nice improvements in the tail. See the corresponding 50% fall in medians on our telemetry evolution dashboard.

Unfortunately, Jeff’s patch was too good. Instead of decoding less images, it ended up decoding no images at all causing unnecessary flicker when switching tabs. The patch got backed out, but this accident provided us with a good baseline of how fast tab switching can be without decoding images :) Jeff landed a correction in bug 799335.

As I mentioned above graph does not include paint times. Jeff also landed bug 800031 which measures the complete tab switch duration (including paint time).

Timothy Nikkel’s Visible Image Decoding

Currently Firefox tends to decode too many images while browsing image-heavy sites. This hurts our total memory consumption, increases tab switch times, etc. Timothy has been posting tests builds in bug 689623 which try to only decode visible images. Please give those builds a spin if you suffer from poor Firefox performance while browsing image-heavy sites.

Startup Time Profiling

Benoit Girard taught the the Gecko profiler how to capture most of browser startup in bug 799638. This might be the most important achievement so far in tackling startup problems caused by extensions. This means that every Nightly user (and in a few weeks every Firefox user) can install the Gecko profiler, click ‘Profile Startup’ and get a report on what makes Firefox startup slow. This can then be posted to bugzilla, SUMO, AMO or this blog so we can easily identify problematic addons, problematic APIs used by addons and the extent of startup overhead contributed by them.

Making extension-aware startup profiling easy has incredible potential for making Firefox startup faster for extension-addicted users. If you can’t wait to try this out, you can install a development snapshot of the profiler extension. Feel free to post your startup profile links in a comment.

Proxy-detection

As I mentioned last time, Patrick McManus fixed proxy-related jank in bug 769764. Last week Vladan Djeric analyzed our chromehang data and confirmed that proxy jank went from being one of our top offenders to not happening.

8 comments

  1. All of tabstrip work was suspended on the front-end team until end of year? where did you see this? that doesn’t sound good on its face, but I’m wondering if there is more to the story there. as far as I know, the australis tab work is still on going.

  2. Performance aspect of tab strip work is delayed until after australis lands.

  3. Wouldn’t it make sense to uplift the proxy patch to FF17 (Beta), since that’s going to be the next ESR release? It would be a shame to have enterprise users waiting another year for such an important snappy fix, when they are the ones most likely to use proxies…
    Or is the patch to risky for that?

  4. It would be nice to uplift it, but Patrick considers it too risky.

  5. So are (large) images not supposed to flicker in when switching tabs? I’ve been seeing this for months and just assumed it was deliberate.

  6. Hi Taras, Can you please explain something. What is the main difference in the result that bug 792199 and 689623 are trying to achieve ?

    Seems to me that both are trying to decode visible images only at tab switch.

  7. Hmm… I ran the startup profile and then I clicked Upload full profile. Is that all I have to do, or did I do it wrong?

  8. Same sort of thing done on different levels of the stack. Not clear yet as to which approach is better for tab switching.