[buddypress-trac] [BuddyPress Trac] #7436: Very slow check_is_friend function

buddypress-trac noreply at wordpress.org
Thu Nov 9 18:17:36 UTC 2017

#7436: Very slow check_is_friend function
 Reporter:  januzi_pl     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  3.0
Component:  Friends       |     Version:  2.7
 Severity:  major         |  Resolution:
 Keywords:  dev-feedback  |

Comment (by dcavins):

 Hi @DJPaul,

 Thanks for your comments.  `wp_is_large_network()` is unsuited for this
 check, because the size of the network is not the key thing here. This
 patch is covering what I'm guessing is an edge case that arises from using
 friendships in an unexpected way. If a user has hundreds of friendships,
 the bulk caching approach still works well. When the user has many
 thousands of friendships, then the bulk cache becomes a problem.

 I've created a spreadsheet comparing the performance of using the bulk
 cache vs bypassing the bulk cache on a sample site:

 So it depends on your site's particular needs. On my main BP site, there
 are around 60,000 users. Only 12 have more than 100 friendships, so the
 bulk cache works well with a Redis object cache.

 If other users can share some idea of how many friendships  their users
 maintain, that would be helpful.



Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7436#comment:15>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list