From 5abef6d06568192e514b23260bb9a205605004a5 Mon Sep 17 00:00:00 2001 From: Lourens Naude Date: Fri, 9 Oct 2026 13:37:27 +0100 Subject: [PATCH] perf(uORB): match nodes by ORB_ID instead of strcmp Assisted-by: Claude:claude-fable-5-1 --- platforms/common/uORB/uORBDeviceMaster.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platforms/common/uORB/uORBDeviceMaster.cpp b/platforms/common/uORB/uORBDeviceMaster.cpp index 020e82985ff..8b181d1f8f6 100644 --- a/platforms/common/uORB/uORBDeviceMaster.cpp +++ b/platforms/common/uORB/uORBDeviceMaster.cpp @@ -454,8 +454,10 @@ uORB::DeviceNode *uORB::DeviceMaster::getDeviceNode(const char *nodepath) uORB::DeviceNode *uORB::DeviceMaster::getDeviceNodeLocked(const struct orb_metadata *meta, const uint8_t instance) { + const ORB_ID id = static_cast(meta->o_id); + for (uORB::DeviceNode *node : _node_list) { - if ((strcmp(node->get_name(), meta->o_name) == 0) && (node->get_instance() == instance)) { + if ((node->id() == id) && (node->get_instance() == instance)) { return node; } }