Commit c22b8ba
committed
Eliminate O(n^2) status removal in DashboardTreeTableModel
updateChannelNodes called statuses.remove(status) inside a loop over
child nodes. With an ArrayList, each remove is O(n), making the update
O(channels × statuses). Collected matched statuses in a HashSet and
called removeAll once after the loop, reducing to O(n + m).
Signed-off-by: Nico Piel <nico.piel@hotmail.de>1 parent 5423492 commit c22b8ba
1 file changed
Lines changed: 3 additions & 1 deletion
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| 501 | + | |
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
507 | | - | |
| 508 | + | |
508 | 509 | | |
509 | 510 | | |
510 | 511 | | |
| |||
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
| 517 | + | |
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
| |||
0 commit comments