I promised that I blog about unified quota and temporary storage once the last “infrastructure” piece lands (bug 785884), so here’s the first part of the story.
Currently LocalStorage, AppCache and IndexedDB all use separate quota and usage reporting mechanisms, which is obviously suboptimal especially from the user point of view, so we decided to unify it.
The idea was to abstract IndexedDB quota handling and plugin other storages to it, but as we started adding new features to SQLite’s extension for quota handling (test_quota.c), we found out that the extension is not very flexible and we need an own quota manager implemented in C++. A rewrite of quota handling (bug 787804) landed exactly 9 months ago. The new quota manager is much cleaner way of quota handling and it also fixes some performance problems. One of them was that when a thread reached the quota limit and it needed to ask the user for the quota unlimited permission, it blocked all the other threads (even for different origins).
Once we had the new quota manager we could start working on a “centralized” quota and storage manager (bug 767944) which landed early in Q2 of this year. The centralized manager is designed to jointly handle quota and storages (for example coordinated operations on top of an origin such as opening of databases, usage reporting and clearing of data) of all current and future storage APIs. At the moment, there’s only IndexedDB plugged into this manager, work on plugging LocalStorage should start soon and the new FileSystem API implementation will clearly use the new quota manager.
Next time, tempory storage.