title: Local storage read/write performance in Mozilla Firefox
body: <p>I am testing different browsers on how do they read/write large amounts of data to/from local storage. Sample data is 1500 customer records with some set of data for everyone (first name, last name, some ids for their location, type, etc). Test application is built on GWT paltform.<br></p>
  
  <p>And what I noticed is that IE8, IE9, Chrome improved their performance in at least 30% after moving to loading data from local storage (rather than from web server). And only Firefox (5.0) is the one who worsened the results (around 30% slower). Remote web-server was used to bring some sort of reality into experiment. 
  The difference between browsers is almost invisible on small data chunks (100-200 records) and the resulting time is also about to be the same. But large amounts reveal the problem.</p>
  
  <p>I found mentioning of this issue on mozilla support site - <a href="https://support.mozilla.com/en-US/questions/750266" rel="nofollow">https://support.mozilla.com/en-US/questions/750266</a>
  But still no solution or workaround there how to fix it.</p>
  
  <p>Javascript profiling shows that calls to function implemented in GWT StorageImpl.java class</p>
  
  <pre><code>function $key(storage, index){
     return index &gt;= 0 &amp;&amp; index &lt; $wnd[storage].length ? 
                  $wnd[storage].key(index) : null;
  } 
  </code></pre>
  
  <p>take the lion's share of time during execution. Which is actually storage.getItem(key) call in GWT.</p>
  
  <p>To avoid this frequent calls I would rather prefer a single call to translate storage contents to the map, for example, and it might help me to save time spent on Firefox's cache I/O operations (if any). But Storage interface ( <a href="http://dev.w3.org/html5/webstorage/#storage-0" rel="nofollow">http://dev.w3.org/html5/webstorage/#storage-0</a> ) contains only getItem() function to receive any contents from the storage.</p>
  
  <p>Any thoughts about how to force Firefox work <strong>faster</strong>?</p>
  
  <p>P.S. Maybe will be useful for someone: I found FF local storage contents using addon SQLite manager, and loading <em>webappstore.sqlite</em> database from the drop-down list of default built-in databases.</p>