RhysR
Convex Community3mo ago
1 reply
Rhys

.query vs .onUpdate - any performance differences?

Hey :wave: - was curious about if I should have any reservations about using .onUpdate as my main way of fetching data from convex

I’m writing a discord bot and it stores the results of the convex query into an LRU cache, and then updates the entries in that cache when the data changes from the onUpdate

This works pretty well, but I don’t hugely need reactivity for a lot of the data fetching I’m doing - a one off fetch would work fine

Is there overhead to doing my data fetching all through .onUpdate that I should be mindful of, or is it functionality equivalent to just calling .query?
Was this page helpful?