This has been a busy week. A lot of fixes have landed, setting up the Firefox 57 cycle for a good start. On the platform side, a notable change that will be in the upcoming Nightly is the fix for document.cookie using synchronous IPC. This super popular API call slows down various web pages today in Firefox, and starting from tomorrow, the affected pages should experience a great speedup. I have sometimes seen the slowdown caused by this one issue to amount to a second or more in some situations, thanks a lot to Amy and Josh for their hard work on this feature. The readers of these newsletters know that the work on fixing this issue has gone on for a long time, and it's great to see it land early in the cycle.
On the front-end side, more and more of the UI changes of Photon are landing in Nightly. One of the overall changes that I have seen is that the interface is starting to feel a lot more responsive and snappy than it was around this time last year. This is due to many different details. A lot of work has gone into fixing rough edges in the performance of the existing code, some of which I have covered but most of which is under the Photon Performance project. Also the new UI is built with performance in mind, so for example where animations are used, they use the compositor and don't run on the main thread. All of the pieces of this performance puzzle are nicely coming to fit in together, and it is great to see that this hard work is paying off.
On the Speedometer front, things are progressing with fast pace. We have been fixing issues that have been on our list from the previous findings, which has somewhat slowed down the pace of finding new issues to work on. Although the SpiderMonkey team haven't waited around and are continually finding new optimization opportunities out of further investigations. There is still more work to be done there!
I will now move own to acknowledge the great work of all of those who helped make Firefox faster last week. I hope I am not mistakenly forgetting any names here!
- Andrew McCreight got rid of some cycle collector overhead related to using QueryInterface to canonicalize the nsISupports pointers stored in the purple buffer, and similarly for pointers encountered during traversal of native roots as well.
- Kris Maglione added some utilities to BrowserUtils that should help our front-end devs avoid synchronous layout and style flushes.
- Amy Chung got rid of the sync IPC messages in the cookie service! This was a substantial amount of work and should eliminate jank on a number of sites that get and set cookies frequently.
- Jessica Jong made us check a boolean flag instead of doing a linear search looking for an attribute in order to determine whether an Element is required.
- André Bargull made String.prototype.toLower/UpperCase use direct VM calls, and also added specialized unicode::CanLower/UpperCase overloads for Latin1 characters. He also added an Ion-inline path for Reflect.getPrototypeOf(). Additionally, he made it possible to inline UnsafeGetReservedSlot when the object is typed as MIRType::Value. Last but not least, he inlined ToObject when called with MIRType::Value.
- Mike Conley ported scrollbox to use smooth scrolling instead of JS driven scrolling. This affects most importantly scrolling the tab bar, and should make it more smooth by removing a lot of slow code that used to run and off-loading that work to the compositor through CSS-based smooth scrolling! He notes on the bug that in order to achieve great performance some follow-ups may be needed.
- Olli Pettay avoided allocating element state objects needlessly when saving the state of and elements.
- Tim Taubert and Nika Layzell collaborated on reducing the cost of the FormDataListener event handler inside sessionstore.
- C.J. Ku fine tuned nsDisplaySVGText::Paint() in several ways.
- Tom Schuster optimized String.prototype.indexOf/lastIndexOf for the case where the search string is equal to the string itself.
- Tooru Fujisawa improved the inlining of RegExpMatcher, RegExpSearcher and RegExpTester in IonMonkey.
- Nicholas Hurley ensured HTTP/2 pushes get canceled if they are already in the cache.
- Jerry Shih deferred initializing some part of the platform font list to the idle queue.
- Felipe Gomes updated the transitionend properties of elements used to implement drop-downs in e10s mode in a deferred task.