Project

General

Profile

Actions

Feature proposal #7521

closed

Redo count displays

Added by krileon over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
05 April 2019
Due date:
% Done:

100%

Estimated time:

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.

Actions

Also available in: Atom PDF