[buddypress-trac] [BuddyPress Trac] #5362: many, many unnecessary queries when BP initializes

buddypress-trac noreply at wordpress.org
Thu Jan 30 18:23:47 UTC 2014


#5362: many, many unnecessary queries when BP initializes
-------------------------------+--------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  2.0
Component:  Core               |     Version:  1.9.1
 Severity:  normal             |  Resolution:
 Keywords:                     |
-------------------------------+--------------------
Changes (by boonebgorges):

 * milestone:  Awaiting Review => 2.0


Comment:

 Thanks for the details, Denis-de-Bernardy.

 All the queries you mention here are necessary for BuddyPress to function,
 though you are correct that all of them should be aggressively cached.
 Persistent caching has not been a focus for BP in the past, but it's
 something that we are planning to pursue vigorously starting with this
 development cycle. See eg #5350. I'll move this ticket into our next major
 release milestone, as I think you're correct that these are easy and high-
 impact areas for caching.

 > The last three on the secondary site give me the impression that the
 last_activity user_meta is updated on every page load.

 The intent is for this to be throttled to every five minutes. See
 https://buddypress.trac.wordpress.org/browser/tags/1.9.1/bp-core/bp-core-
 functions.php#L914. If this is failing, it's a bug.

 >  Not sure what this one is supposed to do (it runs on both sites):

 A number of BP's options are stored in sitemeta when on Multisite, which
 is not auto-cached by WP. So we pre-load them.

 > I'd advise that the above also hints at a potential security problem if
 a user can potentially register with a matching username: could his
 profile take over the front page on a site with a static front page that
 is configured with BP_ENABLE_ROOT_PROFILES set to true?

 We filter WP's 'illegal_names' option to prevent this kind of hijacking:
 https://buddypress.trac.wordpress.org/browser/tags/1.9.1/bp-members/bp-
 members-functions.php#L1023

 Again, thanks for the helpful ticket. It's my personal priority for the
 2.0 dev cycle to take care many of these wp_cache()-able items.

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


More information about the buddypress-trac mailing list