4 ms·
What database were you using and what bottlenecks did you run into? Curious as I have yet to work with dbs in React Native.
by htormey 9y ago
What database were you using and what bottlenecks did you run into? Curious as I have yet to work with dbs in React Native.
- thedjinn 9y agoWe are using SQLite. The performance bottleneck is not the database itself but conversion between the Java and JavaScript environments.
- contingencies 9y agoWhat was the size of the result set? Have you tried appending '... LIMIT <count> [OFFSET <skip>]' to constrain the per-query result set to a reasonable size?
- woah 9y agoObviously almost every react native app out there is accessing a SQL db over the network, and they work fine. Are you seriously saying that it's slower to get data over the react native bridge than over the internet?
- thedjinn 9y agoNo, such a claim would be complete nonsense. We are using a local database as a mirror for offline use, which is a key requirement. Profiling (a forgotten art nowadays) shows that most time spent during queries is in this bridge and not in the actual queries.
- htormey 9y agoI know realm has a React Native library which I imagine you could use to access the db directly. Can you do something like that with SQLite? I.e access it without going through java/the bridge?