How "expensive" is getNumSubscribers() of Publisher
I am processing data in a pipeline and I would like to publish out some intermediate results to check what is going on. However, some of these intermediate results are not necessary for the main processing chain but only for introspection. I. e. if everything runs smoothly and nobody watches them, there is no point for calculating them at all. So basically I want to calculate them, only if the respective publisher has a subscriber. However, my the data flows through my pipeline at some 20 to 40 Hz and I do not want to incorporate any heavy function calls at that freq. So the question is, whether or not it is ok to poll getNumSubscribers() at that frequency? Is the number cached somewhere in the node or does it query the master for each function call? Can I poll it? Or should I cache it my self and then only poll each 1 or 2 seconds?