-
Notifications
You must be signed in to change notification settings - Fork 135
Performance benchmark #144
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
Comments
Looks like Dart DevTools is the tool to use. If I'm not missing something, it's a little impractical because you have to start it while the program is running and can only use it while it hasn't stopped. So in order to profile performance, I'm doing the following:
Rough CRUD benchmark (10k objects, mass ops, see related PR)
The numbers are a little underwhelming, compared to ObjectBox performance in other languages so I'm going to look for potential improvements next. |
Do I correctly assume you used the profile mode?
As for the first profiling it seems that marshalling/unmarshalling is the major bottleneck. This is expected; especially since we did not address #68 yet (generate code to directly create FB from dart objects and the reverse). Do the profiling results confirm that #68 should have most impact? Either way, I'm lacking some info on the "mapping" from profiling results to optimizations. |
Nope, that's flutter only AFAICT. Doesn't do anything for dart CLI apps (doesn't even affect the build/run command executed by the IDE). The results above are coming from Dart VM run (i.e. hitting run in an IDE or running
Nope, copying memory from flatbuffers to C does. See how much |
And this is... release mode? At least the difference to "native", while significant, is not super bad.
Time to do have another profiling session then? I'm really hoping ffi overhead is less than our own sub-optimal handling (#68). And what's that _loadStruct bottleneck for reading? |
🤷 no such things in dart. Kinda looks like "dart VM" is for dev and debugging, while compiling with
I'll post profiler screenshots for state after each commit in #164
That's some FFI handling outside our code (we just access |
Thanks, one after the latest commit should do. PS.: Does "Dart VM" correspond to Flutter's release mode? This is the most relevant runtime and we want to be sure that we are profiling the right thing. PPS.: CRUD results per commit may make more sense to see the individual gains (if you want to do that) |
We should have a set of benchmarks to check the performance of the current implementation and also to relate to when changes are made (for example when #68 is implemented). In short, the benchmark should address CRUD performance, bulk operations (
putMany()
) and queries.You can take clue from other ObjectBox language bindings:
Also, have a look at these blog posts:
The text was updated successfully, but these errors were encountered: