mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 03:48:23 +00:00
913db5d546
Previously, for every bookmarked topic, all topic_user records were being preloaded. Only the current user's record is actually required. This commit introduces a new `perform_custom_preload!` API which bookmarkables can use to add custom preloading logic. We use this in topic_bookmarkable to load just the topic_user data we need (in the same way as `topic_list.rb`). Co-authored-by: Blake Erickson <o.blakeerickson@gmail.com>