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
Sometimes we're not interested in the total count for a request (we're getting the full results, or we just aren't going to look at the count at all), and getting the count runs another potentially expensive query.
We could introduce a request option to skip counting, and either return null for the count, or maybe better, just use PHP's count() to get the count of whatever the current request returned, if that option is set. Optimistically you could cut API response time in half for ones that skip the count, though the reality would be less. This would basically be the opposite of the "just get the count" feature we have when you pass a zero limit in the query.
Places we could use this would include the queries used to get options for select elements and other UIs that show all the options at once, probably the searchOne API helper method, and probably others.
The text was updated successfully, but these errors were encountered:
Sometimes we're not interested in the total count for a request (we're getting the full results, or we just aren't going to look at the count at all), and getting the count runs another potentially expensive query.
We could introduce a request option to skip counting, and either return null for the count, or maybe better, just use PHP's
count()
to get the count of whatever the current request returned, if that option is set. Optimistically you could cut API response time in half for ones that skip the count, though the reality would be less. This would basically be the opposite of the "just get the count" feature we have when you pass a zero limit in the query.Places we could use this would include the queries used to get options for
select
elements and other UIs that show all the options at once, probably thesearchOne
API helper method, and probably others.The text was updated successfully, but these errors were encountered: