[buddypress-trac] [BuddyPress Trac] #6221: messages-loop.php executes BP_Messages_Thread::populate() twice per conversation

buddypress-trac noreply at wordpress.org
Fri Feb 13 17:27:07 UTC 2015


#6221: messages-loop.php executes BP_Messages_Thread::populate() twice per
conversation
--------------------------------------------+------------------------------
 Reporter:  wpdennis                        |       Owner:
     Type:  enhancement                     |      Status:  new
 Priority:  normal                          |   Milestone:  Awaiting Review
Component:  Component - Messaging           |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  dev-feedback reporter-feedback  |
--------------------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  dev-feedback => dev-feedback reporter-feedback


Comment:

 [9482] adds caching for `get_recipients()`.

 Given that fix, I'm not sure how pressing it is to deal with the multiple
 calls to `BP_Messages_Thread()`. Strictly speaking, the objects in the two
 different calls you've listed here are different objects, so they have to
 go through the constructor twice. For single instantiations, we should of
 course try to ensure that `__construct()` is idempotent, but I don't think
 that's the case here.

 wpdennis, in your view, does the caching fix in [9482] mitigate any other
 problems with building multiple `BP_Messages_Thread` objects for the same
 thread on a single pageload?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6221#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list