Skip to content

Flutter Web Storage Benchmarks


1 min read

Benchmark results for popular Web storage libraries in Flutter

Choosing a storage library can be an important choice when you are concerned with performance. As I look to Flutter Web for more performance-critical applications, I wanted to scope out the landscape for storage solutions.

IndexedDB is the current de-facto solution for web storage, but it has many limitations and can have inconsistent behavior between browsers. Until the Filesystem API gains better support and usability, though, or another solution presents itself, it remains the best solution for long-term browser storage.

Below is not an apples-to-apples comparison - for example, Shared Preferences does not use IndexedDB, and SQLite does not persist at all. The goal of this was just to get a starting point for understanding what is currently available.

You can run the bechmarks here and see the code here. Each result is the total time for 1000 documents.

LibraryEngineAdd (ms)Get (ms)Delete (ms)
Shared PreferencesLocalStorage201

* Uses native JS library via interop.