[wp-hackers] Memory spike in comments_template()

Peter Westwood peter.westwood at ftwr.co.uk
Sat Jul 10 05:21:56 UTC 2010


William,

Please reopen that ticket and put as much detail on the problem as you have discovered.

I don't see that the reason for closure on there is necessarily valid - we should try and see if we can improve this as.

As you rightly suggest we should be able to scale nicely when there are alot of comments on a post.

--
Peter Westwood
http://peter.westwood.name

On 10 Jul 2010, at 05:30, William Canino <william.canino at googlemail.com> wrote:

>> 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
>>> 
>> 
> _______________________________________________
> 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