Watermelondb: 馃 Looking for native Android help

Created on 8 Dec 2019  路  9Comments  路  Source: Nozbe/WatermelonDB

There's some iOS performance work I'm doing right now, that's also meant to apply to Android, but to speed up the process, I could use some real help on Android native side.

Here's some of what needs to be done on Android:

  1. Make this PR: https://github.com/Nozbe/WatermelonDB/pull/541/files work on Android. There is a proof of concept of how to do this: https://github.com/Nozbe/WatermelonDB/pull/490 but needs to be integrated . Successfully compile JSI / C++ Database adapter on an Android RN project and show that sqlite works (index.integrationTest.js should spit out success messages in the console).
  2. Set up SQLite encryption as an option. This is particularly important on Android, where sandboxing apps is not as strong as on iOS. BTW: An encryption option on iOS would also be nice, but less important (needed for very serious apps, where possibility of sandboxing bugs and protection even on jailbroken phones is important).
  3. Profile the C++ database adapter on Android (the whole path, from JS, through V8/Hermes, JSI, our C++ adapter, to SQLite), and look for opportunities for optimization and squeezing more performance out of query/batch operations. Note: there are known performance issues when using JavaScriptCore. Use V8 or Hermes. I think I might be using JSI C++ APIs sub optimally, causing unnecessary copy operations on JSI objects. See if this is a problem, and if it is, fix it.
  4. Make a proof of concept for how we could take advantage of multithreading on Android when using JSI C++ adapter. Initially, JSI adapter will only meant to be used synchronously, but ultimately, it would be good to be able to run low-priority queries in a background thread

Most helpful comment

He guys, would like to help with this issue and be done in like a weeks time because I've integrated c++ into android before. So will start now and let you know if I have any questions

All 9 comments

Since we at Capmo are highly interested in having this, but currently lack a bit in terms of time and resources, we'd like to jump in and add a bounty on this issue.

He guys, would like to help with this issue and be done in like a weeks time because I've integrated c++ into android before. So will start now and let you know if I have any questions

Any updates on this? :)

Edit

Still on this , i managed to get it working in android but I have to do some more testing , PR coming up in a bit

Any updates on this @mul1sh ?

@sebastian-schlecht Yes i'll have this ready this coming week, sorry for the delay I got a bit distracted by events on my end, but i've resumed to testing and then sending over a PR in a few days.

That would be really great. If you have some stuff to review / get an opinion, I鈥檇 be happy to help.

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@sebastian-schlecht has any progress been made?

Was this page helpful?
0 / 5 - 0 ratings