Name |
Last commit
|
Last update |
---|---|---|
.. | ||
observers | ||
activity.rb | ||
comment.rb | ||
comment_thread.rb | ||
commentable.rb | ||
constants.rb | ||
content.rb | ||
notification.rb | ||
subscription.rb | ||
user.rb |
Some of the ways comments are accessed in the User model (when a complete user object is requested) lead to an N+1 situation because while we preload the related documents (preloading the parent thread of a given comment, in this case), further accesses to those comments actually never take advantage of the preloaded relations. We should be using the relation directly, which will still act the same as before but allow us to actually benefit from preloading.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
observers | Loading commit data... | |
activity.rb | Loading commit data... | |
comment.rb | Loading commit data... | |
comment_thread.rb | Loading commit data... | |
commentable.rb | Loading commit data... | |
constants.rb | Loading commit data... | |
content.rb | Loading commit data... | |
notification.rb | Loading commit data... | |
subscription.rb | Loading commit data... | |
user.rb | Loading commit data... |