Feature proposal #7588
closedImprove connection activity output to be query based
Description
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.
Updated by krileon over 5 years ago
Same can likely be applied to following behavior.
Updated by krileon over 5 years 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.
Updated by krileon over 5 years 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.
Updated by krileon over 5 years ago
- Status changed from Assigned to Resolved
- % Done changed from 80 to 100