[buddypress-trac] [BuddyPress Trac] #5328: Use of the WordPress HeartBeat API to check for newest activities and to let user load them
buddypress-trac
noreply at wordpress.org
Tue Feb 18 14:08:06 UTC 2014
#5328: Use of the WordPress HeartBeat API to check for newest activities and to
let user load them
-------------------------------------------------+-----------------------
Reporter: imath | Owner: imath
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.0
Component: Activity | Version: 1.9.1
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion needs-testing |
-------------------------------------------------+-----------------------
Comment (by boonebgorges):
Thanks for splitting it up a bit, imath.
> i'm not sure the heartbeat settings in wp-admin would be modified as
the filter only changes it if bp_activity_do_heartbeat() ( activity
directory or group activity or group home page if no custom front)
On reflection, I think it's probably a good idea for us *not* to mess with
global heartbeat settings like this, whether on the front-end or back-end.
Over time, more and more plugins will be using it, and I don't want
BuddyPress to cause headaches because it's being a bully :) If we're
concerned about the overhead that the BP-specific queries will cause
during each heartbeat, we can set an internal timer, and bail out if we're
within the BP-specific interval. For example, if someone changes their
heartbeat interval globally to 5 seconds, we could `bp_update_option(
'bp_activity_last_heartbeat', time() )` and then not run our own queries
until 10 or 15 or 30 seconds have passed, or whatever. (I'm not really
recommending this, FWIW - by the time the heartbeat has happened, WP has
already mostly loaded, so the overhead damage has already been done - our
own query is very tiny by comparison.)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5328#comment:13>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list