You need serialise this in a plugin to avoid all these queries so all the data you need is brought down in one go.
You should not have to fire off a query for every topic in your topic list. That’s never going to scale.
For an example of where this is done take a look at Topic List Previews.
4 Likes