New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using faster database than SQLite #269
Comments
Note that this would be a huge undertaking. We'd need to possibly develop a feature which exports all the data in one zip file, so users can re-import it into the NoSQL based-version. We can have a version which migrates data, but if someone skips that version then still there has to be a way to migrate. |
Ref #247 Interview with the author: https://www.youtube.com/watch?v=pdKb8HLCXOA
|
Once Isar is in-place we can also move debug logging (#147) there! |
ObjectBox depends on LMDB while isar depends on mdbx. ObjectBox has some benchmarks: https://pub.dev/packages/objectbox#flutter-database-performance-benchmarks https://www.reddit.com/r/FlutterDev/comments/sbetws/isar_20_released_a_nosql_database_from_the/ |
We should use isar for preferences persistence as well. This way a full data migration could carry the preferences too. |
Some things to tackle: IsarLinks.findAll() and finalizeActivity
… enhancements, query corrections and development #269
…xport test because complicated mock is needed #269
I end up using neither List embedded classes for the Activity-Record 1:N relationship, nor IsarLink. The latter is disadvised in favor of the embedding, however I cannot control certain things with the embedding. So I'll just handle the relation manually, like I did with Floor/SQLite as well. |
…sed indexes and sorting based on those #269
We are almost there. Need to refactor the migration to a separate screen, because I'm getting
|
It's really 100x+ faster. The whole database migration takes as much as importing just one workout in the past with measly SQLite. |
The nested calls lead to transaction exception only at the third level
…f transactions #269 I tried to async everything all the way but it was a deep tumbling down the rabbit hole, so revert things back.
Isar now in 4.0.0 development mode BTW (see https://github.com/isar/isar/releases/tag/4.0.0-dev.3) but we probably won't wait for a 4.0.0 non dev until our beta release. |
(while moving Android Lifecycle keep rules to match the order in the GeneratedPluginRegistrant.java
We use Floor right now, that must be similar to Moor and essentially SQflite CRUD performance wise. In case of Floor / Moor ORMs a thin serialization/deserialization layer may add some on top of the SQflite performance, although if we went for bare SQflite we'd still need such a layer.
We don't use too complicated relation queries. We mostly sort by recording time. I should create a schema diagram.
On the other hand there are several NoSQL offerings, most popular are: Sembast (https://pub.dev/packages/sembast), Hive (https://pub.dev/packages/hive), and ObjectBox (https://pub.dev/packages/objectbox). Hive is the more popular these days. Sembast mentions that it loads the DB file(s) into memory, which is extremely concerning if the app has years of installation time and hundreds of workouts stored.
The text was updated successfully, but these errors were encountered: