title: IndexedDB vs Storage
body: <p>IndexedDB is often recommended for storing large amount of data in WebExtensions (or Chrome Extension). <code>"unlimitedStorage"</code> seems to apply to both IDB and Storage.</p>
  
  <p>In case of non-tabular text data where the indexed searches are not needed, what is the benefit of using IndexedDB over Storage?</p>
  
  <p>They both use object based architecture and there is a great performance overhead in case of IDB.</p>
  
  <p>I tested parsing and saving 4mb data to storage which took less than 1 second while in case of IDB it hung the browser for minutes and I had to forcefully shut it down.</p>
  
  <p>Reference: <a href="https://stackoverflow.com/questions/34060487/chrome-extension-store-large-amounts-of-data">Chrome extension store large amounts of data</a></p>
  
  <blockquote>
    <p>Only WebSQL, IndexedDB, chrome.storage.local and HTML5 File System
    (sandboxed file system) can grow past 5MB limit via "unlimitedStorage"
    permission.</p>
    
    <p>manifest.json: "permissions": ["unlimitedStorage"]</p>
    
    <p>Provides an unlimited quota for storing HTML5 client-side data, such as databases and local storage files. Without this permission, the extension or app is limited to 5 MB of local storage.</p>
  </blockquote>