ignore unique-name dbus connections

Unique-named dbus connections should not be exposing dbus objects
and are created by dbus clients (if only an unnamed connection exists).
Filter these out in order to reduce the re-scanning effort in
entity-manager.

On some systems with a high number shell-script driven `busctl`
operations, this was reported to have a net performance benefit.  I
ran this on Bletchley hardware and observed a small (<1sec) boot time
performance, which was difficult to distinguish from the noise.

Tested: Ran on Bletchley and observed identical EM `busctl tree`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I08b1fe87665312e9bab019f7bff748e03cdc0027
diff --git a/src/entity_manager.cpp b/src/entity_manager.cpp
index 7d85d53..a20ac67 100644
--- a/src/entity_manager.cpp
+++ b/src/entity_manager.cpp
@@ -1104,7 +1104,16 @@
     sdbusplus::bus::match_t nameOwnerChangedMatch(
         static_cast<sdbusplus::bus_t&>(*systemBus),
         sdbusplus::bus::match::rules::nameOwnerChanged(),
-        [&](sdbusplus::message_t&) {
+        [&](sdbusplus::message_t& m) {
+            auto [name, oldOwner, newOwner] =
+                m.unpack<std::string, std::string, std::string>();
+
+            if (name.starts_with(':'))
+            {
+                // We should do nothing with unique-name connections.
+                return;
+            }
+
             propertiesChangedCallback(systemConfiguration, objServer);
         });
     // We also need a poke from DBus when new interfaces are created or