-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: Add native sqflite indexeddb database #1616
Conversation
Replaces #1541 |
ba8087c
to
d2a4adb
Compare
d2a4adb
to
fbe77a9
Compare
Hm, I feel like having an explicit IndexedDb and SqfliteDb backend would make more sense, instead of building an abstraction just to tear it down. Yes, this would be more maintenance overhead, but it would allow some neat optimizations like cursors into responses. |
Well we had this discussion in refinement meeting already and here: https://docs.google.com/document/d/1gkGEuoldL0IvFod05a4NTXVY4T4pXsGxL6EwSI41-o0/edit#heading=h.as6xvrbd4ygj I personally think the risk of platform specific bugs is too high. But we can put this again on the agenda on the next refinement |
fbe77a9
to
4241674
Compare
4623969
to
c8a1e59
Compare
492a1c7
to
2b08db3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the actual database is too long for me to review and I am just assuming it is correct, since you copied it from the old implementation. There are some small suggestions here and there and some questions I have, otherwise this looks good to me.
a2397b6
to
67b44ad
Compare
7050e81
to
341e383
Compare
341e383
to
4e80cc0
Compare
fix: Edit last event breaks db feat: Add native sqflite indexeddb database feat: Split up preload and nonpreload room state boxes
4e80cc0
to
6db019a
Compare
Another approach to add former fluffybox directly to
the sdk. So we avoid any
requirement for a new name.
Just name it "MatrixSdkDatabase".
Benchmarks from 22-11-2023
HiveCollections (for comparison)
Matrix SDK Database (this here! Formerly known as FluffyBox)
Pure SQFlite Database (other approach)
Notes
All tests have been done with encryption. So we used HiveCipher and SQLCipher.
I assume that
Build database
is more or less equal in Matrix SDK Database and the pure SQFlite Database and the difference is just luck here. That processing sync is so much slower there might be caused by that the pure sqflite database needs to handle some logic in sql while the Matrix SDK Database does this in Dart and then just puts values in the DB. Just putting key/values and dump a whole table seems to be the fastest with SQFlite.What is definitely still ugly in any key/value store is our handling of inboundGroupSessions and the aggressive caching. But this can be improved to optimize RAM usage and speed.