react-native-sqlite-storage icon indicating copy to clipboard operation
react-native-sqlite-storage copied to clipboard

Issues with SQLite and Hermes

Open Gavin-PunchCard opened this issue 3 years ago • 4 comments

I'm working on a react-native application where I'm running 275k queries (broken into groups of 20k). With hermes disabled, it takes about 5 minutes to complete versus 20 minutes with hermes enabled. I'm having trouble finding anything about this on google, so trying a couple different locations to see if anyone has ideas.

Expected Behavior

SQLite queries to run as fast or faster with hermes enabled

Current Behavior

Enabling hermes causes a large number of queries to take ~4x as long

Steps to Reproduce (for bugs)

Enable hermes

Your Environment

react-native-sqlite-storage version 5.0.0 & 6.0.0 (no difference) react-native 0.66.4 Android & iOS, multiple different version of each

Gavin-PunchCard avatar Feb 03 '22 18:02 Gavin-PunchCard

Not sure what hermes is.

andpor avatar Feb 24 '22 15:02 andpor

Not sure what hermes is.

https://reactnative.dev/docs/hermes

fobos531 avatar Feb 27 '22 21:02 fobos531

Not sure what hermes is.

https://reactnative.dev/docs/hermes

Thank you Fobos!

From my understanding, this will be what react-native moves towards fully (eventually). We're doing a fairly big refactor of an older project, so for us it was a good time to try and switch. It may still be premature for us and have some bugs to work out.

The TL:DR for the documentation is that it's the new javascript engine for react-native. Supposedly it makes things faster.

Gavin-PunchCard avatar Feb 28 '22 15:02 Gavin-PunchCard

Update - We disabled Hermes for the time being as we were unable to find a solution.

This issue should be kept on the radar as it appears that React Native 0.68 will be using Hermes as the default engine. Other engines (JavaScript Core) will still be supported, but Hermes will need to be explicitly disabled.

https://reactnative.dev/blog/2022/03/15/an-update-on-the-new-architecture-rollout

Gavin-PunchCard avatar Mar 17 '22 15:03 Gavin-PunchCard