[wp-hackers] Memory spike in comments_template()

William Canino william.canino at googlemail.com
Sat Jul 10 04:30:22 UTC 2010


> I will have to therefore write my own comments_template()....

... Writing this turns out to be a complicated mod because the various
comment helper functions and callbacks presume that $comments has all
the comments. :-(

----> Well, this means while WordPress is not a blog anymore per se,
WordPress is NOT a discussion forum either, because WordPress doesn't
scale when it has a plethora of comments.

In the meantime, the palliative that lowered the memory usage by 3MB
is by commenting out "update_comment_cache($wp_query->comments);"





On 09/07/2010, William Canino <william.canino at googlemail.com> wrote:
> (I should add that I have threading off.)
>
> Denis-de-Bernardy has declared the issue as wont-fix :-(
>
> https://core.trac.wordpress.org/ticket/8071
>
> I will have to therefore write my own comments_template()....  Does
> anyone have an alternative solution?
>
> W
>
>
> On 09/07/2010, Otto <otto at ottodestruct.com> wrote:
>> On Fri, Jul 9, 2010 at 3:57 PM, William Canino
>> <william.canino at googlemail.com> wrote:
>>> <!-- BEFORE: 25033360 -->
>>> <!-- START: 33953448 -->
>>> ... (comments go here) ...
>>> <!-- END: 36172480 -->
>>> <!-- AFTER: 36113680 -->
>>>
>>> The memory usage jumped 8.5 megabytes between BEFORE and START.
>>>
>>> Do I really have to move out some of the older comments of this blog
>>> post?  Is there another solution?
>>
>> Comments don't get pulled out of the database until the
>> comments_template function is called, so that basically means you've
>> got 8+ meg of comments on the post in question.
>>
>>
>> -Otto
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>


On 09/07/2010, William Canino <william.canino at googlemail.com> wrote:
> (I should add that I have threading off.)
>
> Denis-de-Bernardy has declared the issue as wont-fix :-(
>
> https://core.trac.wordpress.org/ticket/8071
>
> I will have to therefore write my own comments_template()....  Does
> anyone have an alternative solution?
>
> W
>
>
> On 09/07/2010, Otto <otto at ottodestruct.com> wrote:
>> On Fri, Jul 9, 2010 at 3:57 PM, William Canino
>> <william.canino at googlemail.com> wrote:
>>> <!-- BEFORE: 25033360 -->
>>> <!-- START: 33953448 -->
>>> ... (comments go here) ...
>>> <!-- END: 36172480 -->
>>> <!-- AFTER: 36113680 -->
>>>
>>> The memory usage jumped 8.5 megabytes between BEFORE and START.
>>>
>>> Do I really have to move out some of the older comments of this blog
>>> post?  Is there another solution?
>>
>> Comments don't get pulled out of the database until the
>> comments_template function is called, so that basically means you've
>> got 8+ meg of comments on the post in question.
>>
>>
>> -Otto
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>


More information about the wp-hackers mailing list