Feature proposal #7521
closedRedo count displays
Description
Currently the fallback for comments, likes, etc.. is to call ->rows( 'count' ). This is a full table count. This is extremely slow. Most other usages are using the preFetch code to fast count the assets. Remove this fallback usage to ->rows( 'count' ) and instead just use the fast asset count through prefetch functions. It's not 100% accurate in that if a comment is hidden via privacy it'll still increase the count, but not be visible but that's ok as we're talking 400ms query compared to a 1-10ms query.
Updated by krileon over 5 years ago
- % Done changed from 0 to 80
All 'count' usages replaced with asset prefetching behavior which is significantly faster as we only need a rough asset count. Notifications is the only exception and needs further additions to the query to handle prefetching counts there.
Updated by krileon over 5 years ago
Notifications table needs to be padded to a million rows to accurately determine count performance.
Updated by krileon over 5 years ago
- Status changed from Assigned to Resolved
- % Done changed from 80 to 100