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