Feature proposal #7588

Improve connection activity output to be query based

Added by krileon 7 months ago. Updated 6 months ago.

Target version:
Start date:
11 June 2019
Due date:
% Done:


Estimated time:


Currently this is grabbing all of the users connections, looping the array, and turning them into assets then adding them to the assets array. This is fine for a few connections, but will quickly get out of hand. This should ideally just query for this information probably using a subquery.


#1 Updated by krileon 7 months ago

Same can likely be applied to following behavior.

#2 Updated by krileon 7 months ago

  • Priority changed from Normal to Urgent

With just 10,000 connections the query is completely crippled. It's entirely possible 2,500 is causing problems. The connection handling needs to be completely rewritten.

#3 Updated by krileon 7 months ago

The performance is only hurt if the user has a significant amount of connections and none of those connections (or a large amount of them) have no posts. With 10,000 connections as long as at least ONE of the users has posts the entire performance issue goes away. This is pretty normal for query performance. With the IN usage vs subquery vs join there is no performance difference; they're all terrible if none of the connections have posts and they all perform the same if at least 1 connection has a post.

Need to consider a means of verifying if a connection has any posts. This also should still be a subquery or join since the active connections query only grabs the first 200 users.

#4 Updated by krileon 7 months ago

  • % Done changed from 0 to 80

#5 Updated by krileon 7 months ago

  • Status changed from Assigned to Resolved
  • % Done changed from 80 to 100

#6 Updated by krileon 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF