You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on optimizing all our queries and yes I can get by using sanityClient here but I'm not sure why there is such a significant difference between the two.
What is different about this particular query (from our others)? It is probably a somewhat complicated nested fragment that looks like:
This is not the only place of complexity but it's certainly the source of delay (i.e., when I delete this groq fragment the query is fast again.
How I got the original logs:
console.time('sanityClient.fetch');constdata=awaitsanityClient.fetch<Page>(PAGE,{ q, z },);console.timeEnd('sanityClient.fetch');console.time('sanity.loadQuery');const{sanity}=context;consttest=awaitsanity.loadQuery(PAGE,{
q, z
});console.timeEnd('sanity.loadQuery');
The text was updated successfully, but these errors were encountered:
We have one query that takes over 3 minutes once moving to loadQuery. With sanityclient.fetch it's 2 seconds.
I'm working on optimizing all our queries and yes I can get by using sanityClient here but I'm not sure why there is such a significant difference between the two.
What is different about this particular query (from our others)? It is probably a somewhat complicated nested fragment that looks like:
This is not the only place of complexity but it's certainly the source of delay (i.e., when I delete this groq fragment the query is fast again.
How I got the original logs:
The text was updated successfully, but these errors were encountered: