Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Follow-up to #1498662-11: Refactor comment entity properties to multilingual
currently CommentStorage::buildQuery()
adds inner join that have @todo to remove
Proposed resolution
fix todo
Remaining tasks
tbd
User interface changes
no
API changes
no
Comment | File | Size | Author |
---|---|---|---|
#5 | comment-join-user-2292815.5.patch | 1.62 KB | larowlan |
Comments
Comment #1
andypoststub
Comment #3
joshi.rohit100Updated.
Comment #4
andypost@joshi.rohit100 As the issue said the patch should remove this join - no reason to join users because comment does not use the fetched data.
See
comment_prepare_author()
Comment #5
larowlanLike so? Not sure of the perf implications here though.
i.m.o the join is better.
Comment #6
andypostActually it depends on usage, and a kind of commenters ;)
Anyway there's no performance effect because:
1)
comment_prepare_author()
intemplate_preprocess_comment()
anyway loads/creates a user object to properly theme a username2) parent comment is loaded for each rendered comment #1857946: Comment parent template variables are built twice
Comment #7
BerdirYeah, a mongodb backend for example couldn't add such a join, and one entity storage shouldn't assume anything about another, they might not even be in the same place.
Comment #8
catchAre we already multiple loading all referenced users for comment listings?
Comment #10
andypost