Descendant walking in delete_task called Vec::contains in the inner loop, making the traversal O(n^2) in the number of tasks. Swap the visited set to HashSet so membership tests are O(1); HashSet::insert also folds the contains-check and record-new steps into one call. |
||
|---|---|---|
| .. | ||
| tauri | ||