[buddypress-trac] [BuddyPress Trac] #7130: bp_notifications_get_all_notifications_for_user gets all records and can cause memory leak

buddypress-trac noreply at wordpress.org
Wed Jun 22 13:33:28 UTC 2016


#7130: bp_notifications_get_all_notifications_for_user gets all records and can
cause memory leak
-------------------------------------+-----------------------------
 Reporter:  hberberoglu              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Toolbar & Notifications  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:                           |
-------------------------------------+-----------------------------
Changes (by DJPaul):

 * type:  enhancement => defect (bug)
 * component:  Performance => Toolbar & Notifications
 * milestone:  Awaiting Review => Future Release


Comment:

 It looks like we should change this function to cache the Notification
 IDs, and separately implement caching for Notification objects (if we
 don't already?).

 We also need to consider where/how we use this data, and ideally set some
 upper-bound for the amount of objects queried to stop memory exhaustion.
 Like, `bp_notifications_get_unread_notification_count` just gets the
 count, so maybe its own SQL count for that is a better solution.

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


More information about the buddypress-trac mailing list