Skip to:
Content

BuddyPress.org

Changes between Version 1 and Version 2 of Ticket #4060, comment 9


Ignore:
Timestamp:
03/14/2012 05:03:15 PM (13 years ago)
Author:
boonebgorges
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4060, comment 9

    v1 v2  
    107107- The COUNT queries are equally bad in all the scenarios above. There's no good way around this. So we should probably stop doing a live query for total member counts, store it as an option, and then bust and recalculate when new members join/become active or when accounts are deleted.
    108108- Backward compatibility: We have filters on the sql queries, which will more or less break if the queries are radically restructured. I think it makes sense to remove the filters and add new ones; see https://core.trac.wordpress.org/ticket/18536#comment:14 and surrounding discussion for WP reasoning on a similar issue
     109- Moving last_activity to the activity tables is problematic because the Activity component is optional. If it's disabled, we don't have the tables, and we don't have the functions that write to the tables. So if we go this way, we either have to make Activity required, or maintain two different sets of query logic - one that uses Activity, and one that doesn't (which would, I guess, be the crappy version we have now). I'd rather go with making Activity required, but that will take a bunch of other kinds of work. An alternative approach is to store last_activity in a standalone table structured just like wp_bp_activity when Activity is disabled, which would still enable Activity to be turned off. The problem there is what would happen if someone decided to switch Activity on and off. Or we could just use a totally separate table, as originally suggested by shanebp, but that seems like a waste to me - we already have an activity table structure in place.
    109110
    110111====