Project

General

Profile

Actions

Feature proposal #7521

closed

Redo count displays

Added by krileon almost 5 years ago. Updated over 4 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 #1

Updated by krileon almost 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.

Actions #2

Updated by krileon almost 5 years ago

Notifications table needs to be padded to a million rows to accurately determine count performance.

Actions #3

Updated by krileon almost 5 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 80 to 100
Actions #4

Updated by krileon over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF