[buddypress-trac] [BuddyPress] #2421: bp_get_forum_topic_count causing massive memory requirements and timeouts

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Jun 3 20:00:06 UTC 2010


#2421: bp_get_forum_topic_count causing massive memory requirements and timeouts
--------------------+-------------------------------------------------------
 Reporter:  3sixty  |       Owner:     
     Type:  defect  |      Status:  new
 Priority:  normal  |   Milestone:  1.3
Component:  Core    |    Keywords:     
--------------------+-------------------------------------------------------
 As reported here: http://buddypress.org/community/groups/how-to-and-
 troubleshooting/forum/topic/bug-or-not-bp_get_forum_topic_count-causing-
 massive-memory-requirements-and-timeouts/

 I previously reported that the BuddyPress /forums page (“Group Forums
 Directory”) was crashing due to memory limit errors on a BP Forum that had
 20,000+ topics. I kept bumping it up until I finally got the page to
 render at a memory limit of 200M. The problem is the function
 bp_get_forum_topic_count is causing massive memory requirements and
 timeouts. This function that displays the total number of topics in the
 tab: “All Topics (23,466)” Even with the memory limit high enough,
 bp_get_forum_topic_count takes a good 4 seconds to generate that number
 (on a VPS that otherwise pulls up pages in a fraction of a second).

 I’m wondering why this function even exists, and if it needs to exist, can
 it be fixed?? r-a-y suspects (and I agree) that this is probably an issue
 with the BB_Query instance.

 bp_forum_pagination_count() already performs a similar function directly
 below the All Topics tab (“Viewing topic 1 to 20 (23,466 total topics)”)
 and all it does is call $forum_template->total_topic_count - very simple

 Given that total_topic_count is already stored in the $forum_template, is
 bp_get_forum_topic_count a dog that serves no purpose and causes massive
 memory issues to boot?

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2421>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list