diff options
author | James Feist <james.feist@linux.intel.com> | 2018-10-22 22:05:56 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2018-10-29 18:52:28 +0300 |
commit | 6bce33bc35e2e5bda0bbe910327c9be7d8d226e1 (patch) | |
tree | 09bf7a3b2c60307322f5261b8f4c3c526237c938 /redfish-core/lib/managers.hpp | |
parent | f12894f8bd7fc26ffa16e5a89072e6c19095f866 (diff) | |
download | bmcweb-6bce33bc35e2e5bda0bbe910327c9be7d8d226e1.tar.xz |
Speed up managers schema
PID was doing every query 8x times.
Change-Id: I11fa064c2f9c416fe15fdfb15c63a6490f0b68dd
Signed-off-by: James Feist <james.feist@linux.intel.com>
Diffstat (limited to 'redfish-core/lib/managers.hpp')
-rw-r--r-- | redfish-core/lib/managers.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp index 9aa29864a4..9e9d150499 100644 --- a/redfish-core/lib/managers.hpp +++ b/redfish-core/lib/managers.hpp @@ -328,10 +328,17 @@ class Manager : public Node // create map of <connection, path to objMgr>> boost::container::flat_map<std::string, std::string> objectMgrPaths; + boost::container::flat_set<std::string> calledConnections; for (const auto& pathGroup : subtree) { for (const auto& connectionGroup : pathGroup.second) { + auto findConnection = + calledConnections.find(connectionGroup.first); + if (findConnection != calledConnections.end()) + { + break; + } for (const std::string& interface : connectionGroup.second) { @@ -353,6 +360,9 @@ class Manager : public Node << "Has no Object Manager"; continue; } + + calledConnections.insert(connectionGroup.first); + asyncPopulatePid(findObjMgr->first, findObjMgr->second, asyncResp); break; |