neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28205 )
Change subject: fix performance for chan_counts and all_allocated stats ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2: FYI, counting is correct if I only use NM_STATECHG. But of course that re-counts the TRX on many more occasions than would be necessary.
On the flip side, state changes to NM objects is very rare compared to the runtime of an osmo-bsc process.
So personally I'd like to use NM_STATECHG now, and move to NM_RUNNING_CHG as soon as that is reliable. So that I can fix the performance regression sooner rather than later...