Filter MiniMongo or from Server

Hi!

Say you’re filtering on lots of documents. Any insights on applying the filters on MiniMongo, or using Pub/Sub and fetching from the Server? I’m currently fetching from the server because I’m getting paginated records. I’m doing this by having a ReactiveVar for my filters and then subscribing in a Tracker.autorun function.

What’s the desired pattern here? I can see the using Pub/Sub would guarantee you’re getting fresh data, but it’ll also be slower than fetching from MiniMongo.

If you just need to filter from subscribed data, then filtering using minimongo is the way to go. If you are filtering against the entire collection, then you need to handle through the publication

As a reminder: most of the time, a method will suffice

1 Like

Thanks! Makes sense.

May you please elaborate a bit more on what you mean by using a method?