control:init trigger: Only call addObjects once

The 'init' trigger will attempt to add the D-Bus properties of all of
its group members to the objects cache with the Manager::addObjects()
function.

That function will call GetManagedObjects to add *all* group D-Bus
paths provided by the service that has the path/interface/property
passed in.

If the group had a service listed in its JSON configuration, then all
members of the group come from the same service, so we know the
first addObjects call would add all group members so there is no need to
keep calling it on the remaining members.

This can lead to a significant performance improvement on startup when
the D-Bus objects in the groups don't exist yet since it would end up
calling addObjects on each member which drives at least GetSubTree
mapper calls each time.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Icc27fdae922fa6f068cd72d9c2299451f768e7d6
1 file changed