Firefox 23 now has faster localStorage implementation

Finally, the more efficient implementation of localStorage DOM API has landed and sticks in Firefox 23, currently on the Nightly channel.  The first build having the patches has id 20130416030901.

More about the motivation and details in my previous post on DOM storage code overhaul.

I want to thank all involved people, namely Vladan Djeric, Marco Bonardo and Olli Pettay for their help, ideas and mainly reviews of this large change.  Thanks!



4 thoughts on “Firefox 23 now has faster localStorage implementation

    1. Thanks :) Yes, I will watch the telemetry very closely. Now it's too soon to say something for sure. I hope for improvement on the main thread blocking events, formerly FETCH_DOMAIN probe, now the variety of _BLOCKING_MS probes.

  1. Awesome work done :)

    1. Has any telemetry started coming that shows the perf improvement of this ?

    2. you mentioned doing several follow-up bugs in bug 600307. Are they still needed, or the final patch has all those ?

    1. Thanks :)

      ad 1: Yes, I can see some first telemetry, but I think it's too early to make a conclusion, it's just one day.

      • getItem (LOCALDOMSTAORAGE_GETVALUE_MS probe). It seems it has dropped as following: 0ms time is in 99.99% of cases with my patch, in 99.95% with the old code. Maximum time is no more then some 410ms with my patch, and is more then 3000ms with the old code. However, this may be just a false positive, telemetry evolution is needed to check better on this
      • More then 82% of preloads make it before localStorage is touched by the content scripts. This is close to my local testing results and means that in those 82% of cases we don't block the main thread AT ALL.
      • Domain data fetching, that doesn't have a direct equivalent in the new code, seems to be unaffected. I've compared LOCALDOMSTORAGE_FETCH_DOMAIN_MS and the new probe LOCALDOMSTORAGE_GETVALUE_BLOCKING_MS that may be considered equivalent to get this result. This is interesting, I would expect it to drop, so worth to monitor and maybe add more probes to figure out the reason.

      ad 2: There are many followups, some larger I want to get to Firefox 23 yet if possible, some smaller like optimizations. None of them is however in the currently landed code.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.