It seems you're going on the right path - a few suggestions -
For computationally intensive - you probably want to cache your results, so you'll only give out a top 'x' number which is updated once a day or similar to that effect. Real time does not seem significant in this case.
I'm not sure what sort of products you have on your site, but if the variety is significant, you might only want to put items that have related information to show up (so Star Wars would only have Star Wars related items popping up).
So if you have "tags" for your products, or keywords, you may want to use a relationship with that.
You may also want to create a weight on how they got to a product. If they got to the product by clicking on that list that you provided, then those type of items will continue to populate, and not give other products a chance to show up, so give it a low weight. The heavier items would pop up instead.