This project is an attempt to answer the question: What is the best (fastest, most robust, most feature-rich) data persistence framework for Android?
I've been using Cupboard for some time now. It's a great framework for simpliyfing data persistence, built on top of SQLite. However, for a simple application I always wanted to find a rather simpler approach, instead of having to setup a database or ContentProvider. This is why I wanted to start searching what's out there. New candidates for persistence are Realm and Couchbase (hopefully more coming soon).
Preliminary results for 1K, 10K and 100K items (times are in milliseconds):
1K | 10K | 100K | |
---|---|---|---|
Cupboard | 80 | 705 | 4189 |
Realm | 21 | 131 | 892 |
1K | 10K | 100K | |
---|---|---|---|
Cupboard | 134 | 2136 | 26873 |
Realm | 114 | 752 | 6892 |
Tests were performed on a MacBook Pro 2013 using Genymotion Nexus 4 Android 4.4.4 emulator.
Initial tests indicate that Realm is much faster than Cupboard (SQLite), with 3.8x-5.3x faster writes and 1.17x-3.8 faster reads.