Extremely slow query: how to optimize?
I have been trying to optimize a query I use frequently in an app I am building with Convex. However, it consistently shows extremely slow query times (see attached).
I have already tried to optimize as much as possible, but this speed is just unacceptable, hindering the user experience even for test users.
4 Replies
Here's the code:
I can confirm that _getPermittedOfAccount is not the problem as all the other functions that use it do not suffer from the same speed issues.
My hypothesis is that the storage calls might be extremely slow, but in that case how would I optimize if I do want all the avatar pictures?
End of the day for me, so I might dig in to this tomorrow. But I wanted to make sure you saw the console.time stuff we added just now in convex 1.9. https://news.convex.dev/announcing-convex-1-9/
Convex News
Announcing Convex 1.9
Big Import and Export Improvements
When we released ZIP file imports and exports in Convex 1.7, it wasn't long before industrious developers started hitting the limitations. We’ve got some big improvements for you.
* File storage can now be included in Snapshot Export
* Snapshot import via npx convex import
Could help narrow it down at least!
Ok cool, I'll try that and report back if I find something