- πΊπΈUnited States smustgrave
Last patch had some failures.
Also issue summary update was requested and still needs to happen it appears.
Updated: Comment #7
When using threaded comments, template_preprocess_comment() in comment.module loads the parent comment when rendering every comment in the thread.This duplicates a lot of the preparation of the comment variables that's already been done when rendering the actual parent comment, assuming it's done on the same page. That's likely to be a noticeable regression when you have a lot of threaded comments on a page, for example on groups.drupal.org. We should look at finding way to re-use the variables created for the parent comment I think.
Everything.
Follow-up from [#1272870:79]
+ if ($comment->pid > 0) { + // Fetch and store the parent comment information for use in templates. + $comment_parent = comment_load($comment->pid); + $variables['parent_comment'] = $comment_parent; + $variables['parent_author'] = theme('username', array('account' => $comment_parent)); + $variables['parent_created'] = format_date($comment_parent->created); + $variables['parent_changed'] = format_date($comment_parent->changed); + $uri_parent = $comment_parent->uri(); + $uri_parent['options'] += array('attributes' => array('class' => 'permalink', 'rel' => 'bookmark')); + $variables['parent_title'] = l($comment_parent->subject, $uri_parent['path'], $uri_parent['options']); + $variables['parent_permalink'] = l(t('Parent permalink'), $uri_parent['path'], $uri_parent['options']); + $variables['parent'] = t('In reply to !parent_title by !parent_username', +
This means that if you're using threaded comments, then we're going to duplicate a lot of the preparation of the comment variables (format_date() twice, theme_username() for example), that's already been done when rendering the actual parent comment, assuming it's done on the same page. That's likely to be a noticeable regression when you have a lot of threaded comments on a page, for example on groups.drupal.org. We should look at finding way to re-use the variables created for the parent comment I think.
Also there are variables created here that never get used? Can we just remove those please?
Needs work
9.5
It affects performance. It is often combined with the Needs profiling tag.
It may affect performance, and thus requires in-depth technical reviews and profiling.
It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Last patch had some failures.
Also issue summary update was requested and still needs to happen it appears.