Does meteor re use subscriptions?

Say if I do this:

Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');
Meteor.subscribe('test');

Is that the same as doing it once, as Meteor will re use it? Or will Meteor literally create 10s of different subscriptions?

My concern is because im using react-komposer, and im getting to this point where I’ll end up having about 30 small React components all subscribing to one collection, and it feels inefficient.

That’s one subscription. It’s a simplified version of this

  1. If the subscription is run with the same arguments then the “new” subscription discovers the old “marked for destruction” subscription that’s sitting around, with the same data already ready, and simply reuses that.
2 Likes