I have a question regarding how Meteor handles oplog subscriptions for constantly changing data from large collections. Specifically, does Meteor automatically know which subscriptions to execute from the oplog if specific fields are specified at the time of the subscription? If I have too many elements, does it know which element to target to notify the subscription, or does it need to execute every single subscription for each entity in the collection?
It does not “know” it, it has to be checked. Every oplog entry is checked with every observer (think observer = cursor, but it can be deduplicated). The result may be…
…“maybe”, e.g., $inc with $sort and $limit, as the document may change the result (this is slightly more complex, but you get the idea). This one results in a refetch of the cursor (not always, but most of the time).
I’m not sure what do you refer to as “element” here, but once the above detection is done, the oplog entry is “applied”, resulting in zero or more DDP messages sent to the client. It’s done in a smart way, optimized for the lowest possible number of messages (at a cost of server processing time).
Why are you asking exactly? Are you facing some specific problem?