App.get_project_refs(): Use a set for deduplication #120
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20260922-app-get-project-refs-use-a-set-for-deduplication"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
App.get_project_refs(): Use a set for deduplication
get_project_refs() deduplicates the walk results by scanning the result list for each appended element, so the cost grows quadratically with the number of projects, which is noticeable when walking a dev tree of 320 projects.
Track the already-seen projects in a set, and append an element only when it is new. The resulting list is unchanged, and the membership test is O(1) instead of O(n).