Replies: 3 comments 1 reply
-
|
What do you mean by "long running load"? Queries normally execute in a small fraction of a ms. |
Beta Was this translation helpful? Give feedback.
-
|
Its during the sync time for the electric sql collection. I am checking the isLoading in the useLiveQuery response and during it being true, the ui/main thread is blocked. |
Beta Was this translation helpful? Give feedback.
-
|
Wow, this embarrassing. I had some bad code that was re-rendering the component over and over and not actually loading propertly. Fixing that seems to have fixed my issue. Closing discussion here |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a expo/react native project that uses tanstack db + electric sql collection. So far, I couldn't be more impressed with the developer experience. One thing I'm running into is that useLiveQuery is blocking the main thread when a long running load occurs, I am wondering if anyone has solved for this? I was looking at using something like react-native-workets, or some sort of async scheduling, but I wanted to ask here first.
Beta Was this translation helpful? Give feedback.
All reactions