title: Using WebWorkers just for LocalStorage?
body: <p>Recently, on CoderWall <a href="https://coderwall.com/p/rkls8g" rel="nofollow">https://coderwall.com/p/rkls8g</a>: </p>
  
  <blockquote>
    <p><em>Make use of Web Workers</em></p>
    
    <p><em>When it comes to do synchronous stuff like using the LocalStorage or
    XMLHttpRequest, It's way better to make use of workers to do jobs in a
    non-blocking manner ...</em></p>
  </blockquote>
  
  <p>Is there really a need? For AJAX, since its already async, there seem no need to introduce more overheads of using WebWorkers? </p>
  
  <p>For LocalStorage, the argument is that </p>
  
  <blockquote>
    <p><em>LocalStorage's API writes all data directly into filesystem, so it has to lock the file. and it's done synchronously</em></p>
  </blockquote>
  
  <p>Is this really slow? Since I'd expect only 1 application (ur browser) to write to LocalStorage for your domain, it isn't likely to block isit? LocalStorage is capped at only 5MB? The only situation I see a long waiting time to write to LocalStorage is perhaps if you have multiple tabs/browser accessing the same web app and writing tons of stuff? Even so, I suppose it should be cached, hopefully a write back cache, then it should be fast again? </p>