New comments link on node teasers issues two queries per node

Created on 30 December 2009, over 14 years ago
Updated 18 June 2023, 12 months ago

When viewing a list of node teasers with comments, two queries are issued, one for node_last_viewed() to get the last timestamp, and the other to count how many new comments there are from comment_num_new().

At the least, we could use #636992: Entity loading needs protection from infinite recursion β†’ (once it's in), to do a single query to get history records for all nodes on the page and stick it into a $node->last_viewed property, then in comment_node_view() use that for the comment_num_new() call.

πŸ“Œ Task
Status

Postponed: needs info

Version

9.5

Component
CommentΒ  β†’

Last updated 3 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024