-
Type: Story
-
Status: To Do (View Workflow)
-
Priority: Medium
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: Future
-
Component/s: openolt-adapter, rw-core
-
Labels:
-
Story Points:8
-
Epic Link:
GetChildDevice when used to get a single ONU from an OLT, loops through the list of all ONU ids for the OLT and retrieves every one of them, comparing the serial_number to see if it's the wrong one. Linear search with a fetch of each item being searched.
https://github.com/opencord/voltha-go/blob/master/rw_core/core/device/manager.go#L339
This seems a very expensive operation.
It also returns an entire device structure listing all the child ports and flows of the device and most likely those are not needed by the client. This seems another very expensive operation.