Manager::getFrusByExpandedLocationCode implementation uses getManagedObjects() API to get map of managed objects and then iterates the map to get an location code match.
This can be made more efficient by using ConfigManager. ConfigManager::getInventoryPaths() public API returns inventory path(s) for a given unexpanded location code.
We can convert the expanded location code to unexpanded location code and use the ConfigManager API. This avoids a D-Bus call and looping through a map of managed objects to search for a match.
Revisit this implementation once the conversion logic from expanded to unexpanded location code is implemented.
Manager::getFrusByExpandedLocationCodeimplementation usesgetManagedObjects()API to get map of managed objects and then iterates the map to get an location code match.This can be made more efficient by using
ConfigManager.ConfigManager::getInventoryPaths()public API returns inventory path(s) for a given unexpanded location code.We can convert the expanded location code to unexpanded location code and use the ConfigManager API. This avoids a D-Bus call and looping through a map of managed objects to search for a match.
Revisit this implementation once the conversion logic from expanded to unexpanded location code is implemented.