Skip to content
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

Add drift to comparison #9

Open
rodydavis opened this issue May 21, 2024 · 6 comments
Open

Add drift to comparison #9

rodydavis opened this issue May 21, 2024 · 6 comments

Comments

@rodydavis
Copy link

On mobile you would use SQLite in WAL mode to allow for much higher throughput of reads and writes.

Also drift is a very popular library that can work in an isolate and FFI for better performance.

@rodydavis rodydavis changed the title SQLite performance comparison SQLite improve performance comparison May 21, 2024
@greenrobot-team
Copy link
Member

Thanks for the tips! With regards to WAL, do you mean this dev tip? Or is there some sqflite API that I'm not seeing?

@greenrobot-team
Copy link
Member

Change in #10, but looks like it makes things worse for this benchmark. Am I missing something here?

@nikitadol
Copy link

I think that comparing sqflite, which works via MethodChannel, with your native/FFI solutions is at least not correct

You can leave this as an example, but you should add the SQLite package that uses it via FFI - for example, drift was mentioned above

@greenrobot
Copy link
Member

I think that comparing sqflite, which works via MethodChannel, with your native/FFI solutions is at least not correct

We make disclaimers about comparing async vs. sync and sqflite does not support synchronous last time we checked. Typical disclaimers include: we do not want to measure async overhead which has nothing to do with database tech. Also, we'll include async comparison in the future.

So, since improvements via WAL as initially suggested did not materialize (let us know if there's a way in a new ticket), I'll change this issue to focus on adding drift.

@greenrobot greenrobot changed the title SQLite improve performance comparison Add drift to comparison Jun 6, 2024
@drewbitt
Copy link

drewbitt commented Jul 27, 2024

You can see here https://ente.io/blog/tech/sqlite-objectbox-isar/ and the relevant HackerNews post https://news.ycombinator.com/item?id=39289246 about SQLite improvements possible and WAL discussion, and in this use case, optimized SQLite usage being faster than ObjectBox generally.

@greenrobot-team
Copy link
Member

greenrobot-team commented Jul 29, 2024

@drewbitt Thanks for this! Then again this is a very specific use case (storing a list of floating point numbers or double). And as pointed out in the discussion the performance bottleneck seems to always be deserialization to a Dart object.

So again, I don't see how we can improve this benchmark which uses Dart objects with various properties given that information. I still welcome any suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants