fusion_core_preprocess_comment() makes the following call to node_load()
$node = node_load($vars['comment']->nid); // Comment is by node author
$vars['author_comment'] = ($vars['comment']->uid == $node->uid) ? TRUE : FALSE;
$comment_classes[] = ($vars['author_comment']) ? 'comment-by-author' : '';
This is an unnecessary performance drain as the node object is already loaded in the comment variables. My proposed change is:
$vars['author_comment'] = ($vars['comment']->uid == $vars['node']->uid) ? TRUE : FALSE; // Comment is by node author
$comment_classes[] = ($vars['author_comment']) ? 'comment-by-author' : '';
Comments
Comment #1
sociotech commenteddylan,
Good catch. I committed the fix to CVS. It will show up in the next dev snapshot and the upcoming 1.0 release.
Thanks.