[buddypress-trac] [BuddyPress] #967: unnecessary extra query caused by bp_dtheme_show_home_blog

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Oct 2 01:17:38 UTC 2009


#967: unnecessary extra query caused by bp_dtheme_show_home_blog
------------------------------+---------------------------------------------
Reporter:  junsuijin          |       Owner:  junsuijin
    Type:  defect             |      Status:  new      
Priority:  major              |   Milestone:  1.2      
Keywords:  has-patch, tested  |  
------------------------------+---------------------------------------------

Comment(by junsuijin):

 I've not encountered any problems using this patch; however, I've just
 posted the following ticket to http://core.trac.wordpress.org/ticket/10886
 The method in this ticket adds an earlier short-circuit point, further
 reducing queries and loading times on every BuddyPress page, save the
 'recent posts' for members page, which it actually increases queries on
 (but does not break).

 Once this patch is committed to WPMU, we can use something like the
 following code:
 {{{
 function bp_define_no_query() {
         if ( ! bp_is_blog_page() && ! bp_is_user_recent_posts() && !
 defined( 'NO_QUERY' ) )
                 define( 'NO_QUERY', true );
 }
 add_action( 'init', 'bp_define_no_query', 0 );
 }}}

-- 
Ticket URL: <http://trac.buddypress.org/ticket/967#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list