[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
Sun Jun 19 18:35:44 UTC 2016


#7130: bp_notifications_get_all_notifications_for_user gets all records and can
cause memory leak
-------------------------+------------------------------
 Reporter:  hberberoglu  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Performance  |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------
Changes (by r-a-y):

 * type:  defect (bug) => enhancement
 * component:  Core => Performance


Comment:

 Great that you have a thriving community, @hberberoglu!

 I think in this instance, you should limit the number of notifications
 that is pulled in `bp_notifications_get_all_notifications_for_user()`.

 We don't have a suitable filter to modify the arguments in
 `bp_notifications_get_all_notifications_for_user()`, however you could try
 the `'bp_notifications_get_where_conditions'` filter to modify the SQL
 statement.

 Another thing that you might want to consider is automatically deleting
 notifications that are older than a certain date with a WP cron job.

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


More information about the buddypress-trac mailing list