<div dir="ltr"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt" id="gmail-docs-internal-guid-f9496908-dc00-60db-3998-c20f9ede9b2a"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">As many may have already noticed, we recently landed a new experimental backend for the storage.local WebExtensions API (</span><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1406181" style="text-decoration:none"><span style="font-size:11pt;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">bug 1406181</span></a><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">). Here is some additional detail related to the the “reason behind the new backend” and “how to try it”.</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">== Why a new backend? What advantages should be provided by it?</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">The new backend uses IndexedDB instead of a JSONFile, which should allow the storage.local API to store more data than the maximum amount that an extension can currently store in the current JSONFile backend. But more importantly, it should have a smaller performance impact than the JSONFile backend (which always reads and writes the data from the main process and often introduces a latency in the main thread, with a resulting lag in the UI responsiveness).</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">== Can I use the new backend?</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">The new backend is currently behind a preference and disabled by default, while QA is looking at it.</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">You can also test the new backend by setting the "extensions.webextensions.ExtensionStorageIDB.enabled" preference to true from about:config (or from the command line using "web-ext run"), but we strongly advise to do NOT enable it in your real Firefox profiles yet, because:</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">When Firefox is started with the above preference enabled, the existing storage.local data will be migrated from the JSONFile into an IndexedDB database; the old storage file will be removed when the data migration is completed successfully and there is no automated (and/or easy) way to migrate the data back to the old JSONFile.</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Aside from that, any input on the performance and behaviors of the new backend are very welcome, but please use a separate profile (a new pristine one or a new one cloned from one of your existing real Firefox profiles) to prevent involuntary/unexpected extension data loss.</span></p><br></div>