[drupal-devel] [feature] Cache rendered comment threads
moshe weitzman
drupal-devel at drupal.org
Thu Jun 23 01:59:26 UTC 2005
Issue status update for http://drupal.org/node/25563
Project: Drupal
Version: cvs
Component: comment.module
Category: feature requests
Priority: normal
Assigned to: chx
Reported by: chx
Updated by: moshe weitzman
Status: patch
just to clarify, this patch caches the output of comment_render() as a
large HTML hunk. That saves a lot of computation when we show a node.
Further, the cache stays valid for a long time (until another comment
is posted to that thread - quite unlike cache_clear_all()).
The downside is that we can't have php evaluated in comments or other
dynamic filters. At first blush, I am OK with that loss since the
performance gain should be significant.
moshe weitzman
Previous comments:
------------------------------------------------------------------------
June 22, 2005 - 16:45 : chx
First problem to tackle: comments may have dynamic filters. No more.
Comments are not nodes because they should be simple and fast and
dynamic filters are killing this.
So now we have static content built every two minutes on drupal.org,
which is IMO bad. I do CACHE_PERMANENT and take care of killing the
thread only when the particular thread is invalidated.
If you find the patch worthy, I will extend it so that there is no
multiple cache ie. the comments themselves are not cached when called
from comment thread view.
Maybe a similar patch could be introduced for cacheable nodes?
------------------------------------------------------------------------
June 22, 2005 - 16:53 : chx
Attachment: http://drupal.org/files/issues/comment_cache.patch (5.55 KB)
------------------------------------------------------------------------
June 22, 2005 - 17:19 : killes at www.drop.org
looks good, I suggest giving it a test run here on drupal.org and see
how/if the load changes.
More information about the drupal-devel
mailing list