Hi all, I’m wondering what is the best way to handle a large number of template-level subscriptions using Blaze. So for example, I have an HTML table and each table row is an instance of a template with a subscription. Is that already a red flag? Generally this works when the table is paginated, but in a case where it doesn’t make sense to paginate, it would be a terrible experience to wait for all of the data to load for the entire table. So by having each row template subscribe to a single record, the entire table is built immediately and each row waits for its subscription to be ready before rendering its cells.
However, I understand the concept (from Kadira) of observer reuse, and it surely can’t be a good practice to have hundreds or thousands of different subscriptions each based on its own unique
_id. And without coming up with a way to queue the subscriptions, they are all hitting the server at the same time, which probably compounds the CPU problem.
What is the appropriate implementation for a case like this?