Feature proposal #7588
Improve connection activity output to be query based
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.
#3 Updated by krileon about 1 year 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.