Rhys
Rhys10h ago

.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?
1 Reply
Convex Bot
Convex Bot10h ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!

Did you find this page helpful?