Is it possible to avoid template re-rendering when one of several subscriptions changes?


Say I have several subscriptions running in parallel for a large collection. Along these lines:

A: One subscription for all docs with me as owner
B: One subscription for all docs matching a search
C: One subscription for all docs with comments made by me

AFAIK my client side collection is a union of all docs in the three sub’s.

Say I am displaying the docs in the B sub in a template, using {{#each}}.

Now, if I .stop() and resubscribe the C sub, the docs from the B sub are still published and still available in my client side collection, and it is only those docs that are displaying, so in my mind there is no reason for the template to be re-rendered, but it still is.

In my case this bad, since the UI flashes and I loose the part of the UI state that is not in the URL.

Can this re-render be avoided somehow?


You can stop all observers on a Collection with Collection.pauseObservers() for any time and then call Collection.resumeObservers()


subscribing and stopping subscription have nothing to do with refreshing helper if you use correct query in Cursor.find.
are you using iron-router or some autorun to do some other things ?
or show us example on meteorpad