erquhartE
Convex Community3y ago
10 replies
erquhart

Sluggish reactivity

So I haven't fully dug into this for reproducibility and whatnot, but wanted to raise it and see if maybe there's a known issue here.

I'm finding that there are seemingly random slowdowns in reactive updates of some queries. It looks like this:

1. Update something
2. Observe convex logs immediately processing both the update and dependent queries with consistent execution times
3. Observe dependent updates sometimes being instant, and sometimes taking as much as 8-10 seconds

I should also note that this is React Native and I'm only target iOS atm, so no web builds. Using expo and expo tooling, I don't have a great way to observe websocket messages, which adds to the mystery here.

Again, I haven't isolated and I can't stop and focus down on perf just yet, but it's really starting to stand out. I think I can say the following with certainty:

1. The request to convex and convex execution time is all working great based on logs
2. Individual queries are taking a consistent amount of time regardless of how performant they may or may not be (one in question takes about 250ms)
3. React native rendering performance seems really unlikely to be the issue as the delays are quite random, something I've never observed in the RN perf issues I've debugged as they're generally specific in source and relatively consistent.

It feels like the issue is somewhere between Convex completing reruns of dependent queries on the backend and triggering renders of components utilizing these queries in the client. I'm checking for updates right at the convex hooks, before rendering even starts. The delay is between the successful convex log and the useQuery hook triggering a re-render.
Was this page helpful?