objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence
https://docs.objectbox.io/getting-started
Apache License 2.0
927 stars 115 forks source link

Web support vol.2 #190

Open vaind opened 3 years ago

vaind commented 3 years ago

Part of #185

TODO:

srix55 commented 2 years ago

Eagerly awaiting web support. Would be great to see the package with all platform support on pub dev.

fMeow commented 2 years ago

What is the current progress? The last commit is nearly half a year ago. Is there any obstacle? What can I help with?

greenrobot commented 2 years ago

@vaind Did you have any initial perf results yet?

We go with TypeScript, right? For web, I would even go forward with TypeScript if it would be significant slower that some Dart only thing (which seems quite unlikely unless there's some Dart quirk), so would not spent more time on Dart vs TS perf tests.

The scope of this PR should be a minimal Box APIs working; i.e. Box TypeScript API using IndexDB wrapped by Dart. Right?

Update: deferred the target architecture discussion to here.

vaind commented 2 years ago

@vaind Did you have any initial perf results yet?

no, these TODOs are up to date

vaind commented 2 years ago

We go with TypeScript, right? For web, I would even go forward with TypeScript if it would be significant slower that some Dart only thing (which seems quite unlikely unless there's some Dart quirk), so would not spent more time on Dart vs TS perf tests.

Looks like dart (compiled to javascript) may end up being faster than plain javascript:

https://github.com/dart-lang/sdk/issues/38705#issuecomment-573960765 Dart version, dart2js compiled -O4: 29ms JavaScript version: 44ms

So it's not a clear decision (from the performance perspective) unless a small benchmark is created.

greenrobot commented 2 years ago

So it's not a clear decision (from the performance perspective) unless a small benchmark is created.

No need. As I've mentioned before, the decision about the tech stack is not primarily about nuances of JS performance.

vaind commented 2 years ago

So it's not a clear decision (from the performance perspective) unless a small benchmark is created.

No need. As I've mentioned before, the decision about the tech stack is not primarily about nuances of JS performance.

Yes, in that case I agree TS might more useful (for future reuse) albeit a bit harder to implement than plain-dart solution

richard457 commented 2 years ago

Any progress on this? @vaind

richard457 commented 2 years ago

Found this This if it can be of help. !