docbrown/app/views/comments
Jamie Gaskins 5d5dbaca95
Eager-load comment user data (#14902)
* Eager-load comment user data

Profiles and user settings are loaded for on each comment author. On
posts with many comments, this invokes a *lot* of DB queries. This
commit replaces 2 queries per comment with 2 queries for all comments.

* Fix where I misunderstood limit's purpose

This implementation is too clever. It looks like it should just be
getting all but the last, but it uses the fact that the default is 0 to
default to getting all of them. This isn't readily understandable to
someone reading the code.

I don't have a suggestion to fix it yet so I'm just going to leave it
as-is for now.
2021-10-05 10:05:01 +02:00
..
_comment.html.erb Comments UI update (#11283) 2020-11-18 18:21:19 -05:00
_comment.json.jbuilder [deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263) 2020-09-09 15:33:13 -04:00
_comment_avatar.html.erb Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
_comment_date.erb Add horizontal padding on preview card trigger button (#14472) 2021-08-11 12:31:48 +01:00
_comment_footer.html.erb Admin-configurable display locale (#14620) 2021-09-28 11:04:35 -04:00
_comment_header.html.erb Admin-configurable display locale (#14620) 2021-09-28 11:04:35 -04:00
_comment_proper.html.erb Update the UI for Low-Quality-Comments Notice (#12952) 2021-03-16 09:40:29 -04:00
_comment_quality_marker.html.erb Update the UI for Low-Quality-Comments Notice (#12952) 2021-03-16 09:40:29 -04:00
_discussion_lock_reason.html.erb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
_form.html.erb Edit buttons styles for Templates responses (Mod) (#14468) 2021-08-12 15:57:36 +01:00
_liquid.html.erb Remove social icons from comment liquid tag (#11186) 2020-11-02 09:57:08 -05:00
delete_confirm.html.erb Comments UI update (#11283) 2020-11-18 18:21:19 -05:00
deleted_commentable_comment.html.erb Replace EmojiOne with Twemoji (#14517) 2021-08-17 21:29:21 +02:00
edit.html.erb Remove defer attributes from inline scripts - gist embeds (#13407) 2021-06-11 08:22:50 +01:00
index.html.erb Eager-load comment user data (#14902) 2021-10-05 10:05:01 +02:00
index.json.jbuilder Initial commit 2018-02-28 16:11:08 -05:00
new.html.erb Fix linting issues in app/views/comments (#1853) [ci skip] 2019-02-25 13:03:31 -05:00
settings.html.erb Comments UI update (#11283) 2020-11-18 18:21:19 -05:00