[wp-hackers] Memory spike in comments_template()
William Canino
william.canino at googlemail.com
Fri Jul 9 20:57:26 UTC 2010
Hello,
One of my blog's most popular pages is hitting its shared host's
"memory limit", so this host is killing my scripts. To diagnose it I
inserted several memory_get_usage calls in my theme.
This is how my single.php looks like:
<? remove_all_filters('comments_template'); ?>
<!-- BEFORE : <? echo memory_get_usage(); ?> -->
<?php comments_template(); ?>
<!-- AFTER : <? echo memory_get_usage(); ?> -->
This is how my comments.php looks like:
<!-- START: <? echo memory_get_usage(); ?> -->
.... (everything else goes here) ...
<!-- END: <? echo memory_get_usage(); ?> -->
This is my HTML output.
<!-- 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?
(Sorry if this sounds too much like a support forum question. The
wordpress.org forums are down.)
W
More information about the wp-hackers
mailing list