Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

More efficient data structure for favorites #2026

Closed
traeok opened this issue Nov 29, 2022 · 1 comment · Fixed by #2827
Closed

More efficient data structure for favorites #2026

traeok opened this issue Nov 29, 2022 · 1 comment · Fixed by #2827
Assignees
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits v3

Comments

@traeok
Copy link
Member

traeok commented Nov 29, 2022

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.
@traeok traeok added the enhancement New feature or request label Nov 29, 2022
@github-actions
Copy link

Thank you for raising this issue.
The community has 90 days to upvote 👍 the issue.
If it receives 10 upvotes, we will move it to our backlog. If not, we will close it.

@JTonda JTonda added the priority-medium Not functioning - next quarter if capacity permits label Dec 6, 2022
@traeok traeok self-assigned this Dec 29, 2022
@t1m0thyj t1m0thyj moved this from New Issues to Medium Priority in Zowe Explorer for VS Code Dec 26, 2023
@traeok traeok moved this from Medium Priority to In Progress in Zowe Explorer for VS Code Mar 28, 2024
@zFernand0 zFernand0 added the v3 label Apr 9, 2024
@zFernand0 zFernand0 modified the milestones: v3.0.0 GA, v3 pre-releases Apr 9, 2024
@JTonda JTonda closed this as completed May 7, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Zowe Explorer for VS Code May 7, 2024
@traeok traeok linked a pull request May 8, 2024 that will close this issue
14 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request priority-medium Not functioning - next quarter if capacity permits v3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants