Is your feature request related to a problem? Please describe.
Related to favorites management (add/removing favorites for Data Sets, Jobs and USS section)
Describe the solution you'd like
Change method of storing favorites such that the nodes can be mapped 1:1; this should shorten lookup time for corresponding nodes and make logic more straightforward for adding/removing favorites. Since we are searching based on labels, we could assign the node labels as keys for a map-based structure.
The findFavoritedNode and findNonFavoritedNode functions are marked deprecated, but they're being used in the codebase. Refactor w/ the map-based structure (as suggested above), or keep the same structures and remove the deprecation warnings?
Additional context
- Searching through the favorites list is worst-case linear time, as well as removing a favorite - while searching/removing favorites isn't done on a constant/frequent basis, changing to a map-based structure will allow look-up time and removal time to be constant-time operations.
Is your feature request related to a problem? Please describe.
Related to favorites management (add/removing favorites for Data Sets, Jobs and USS section)
Describe the solution you'd like
Change method of storing favorites such that the nodes can be mapped 1:1; this should shorten lookup time for corresponding nodes and make logic more straightforward for adding/removing favorites. Since we are searching based on labels, we could assign the node labels as keys for a map-based structure.
The
findFavoritedNodeandfindNonFavoritedNodefunctions are marked deprecated, but they're being used in the codebase. Refactor w/ the map-based structure (as suggested above), or keep the same structures and remove the deprecation warnings?Additional context