The discussion revolves around preloading custom data and fields in the topic list for Discourse plugins to avoid N+1 queries. sam explains two mechanisms: TopicList.preloaded_custom_fields for loading custom fields and TopicList.on_preload for bulk loading additional data. codinghorror mentions potential N+1 issues in the Feature Voting plugin, which joebuhlig clarifies have largely been resolved. Falco highlights the benefits for plugins like signatures, and sam expresses openness to extending the feature to the post stream. angus provides a link to a 2025 update on the topic.
I had to preload the custom fields due to errors if the data was blank. It was tricky to debug at first because I had existing data so I couldn’t replicate the errors reported. Then someone mentioned this process in Babble. Once I implemented it, the errors were gone. I never looked into it further than that.