[buddypress-trac] [BuddyPress] #3856: Saving activity update action as an array in db

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Dec 15 12:35:39 UTC 2011

#3856: Saving activity update action as an array in db
 Reporter:  modemlooper  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Activity     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  1.7-early    |
Changes (by boonebgorges):

 * keywords:   => 1.7-early
 * milestone:  Awaiting Review => Future Release


 I'm not sure that saving it in an array is the best, but I think we should
 definitely consider not saving it (only) as a hardcoded string. It causes
 huge problems, among other things, for people who want to build
 multilingual BP installations.

 The root reason for doing it this way is performance. To rebuild that
 string at runtime, we need the name and URL of the object(s), such as the
 group, forum, etc. Pulling them up when building a page of 20 activity
 items would add a ton of overhead if done wrong.

 So, we might think of saving it in chunks (what modemlooper is suggesting,
 essentially). Alternatively, we could mod the activity loop a bit so that
 we do a second query for all of the associated item metadata in one fell
 swoop, and then use that to construct on the fly. This latter option would
 add a single query, and would add a bit of computational overhead, but it
 might be the most flexible. We would make ample use of the WP cache, so
 that persistent object caching would all but eliminate all overhead.

 Let's talk about it early in the 1.7 cycle. This is something that's
 bothered me for a while, and I think it'll be fairly easy to fix.

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

More information about the buddypress-trac mailing list