View Optimisation for non-consuming choice

When trying out with view optimisation with Canton 2.8.3, we noticed that, non-consuming choice does not seem to take the observer on the contract as it’s Informee (if not specified explicitly). Is that correct?

E.g.

template A

where
signatory P1
Observer P2
nonconsuming choice C1
controller P1
do

In above cases we will only have P1 as Confirmee and no Informee.

In that case, if we’d like to reduce views by explicitly adding P2 as observer to the choice C1, does that mean we are then creating more traffic to the participant node holding P2 than before?

Thanks in advance!!

Contract observers like P2 in your example only get informed on creates and consuming exercises (including archives).
You are right that if you want P2 to be informed of a nonconsuming choice call, you need to add them as a choice observer. This will increase traffic a little bit:

  1. It will mean that P2 reads the view.
  2. If C1 wasn’t previously the root node of a view, it will now be the root node of a view because you have changed the set of informees compared to the parent node. This would result an extra view.
1 Like

Understood!
Thank you so much @bernhard.