Commit 581fe68
performance: speed up mergePath child node removal (#2216)
Improved performance on mergePaths plugin. Changed the to-be-deleted
node from a list to Set. I ran into performance issues with large files,
and some of them were significantly improved by changing the data
structure.
Does not change any behavior: the list was previously used just for
.includes, which is an O(n) call. The .has in set is O(1).
Co-authored-by: Jussi Timonen <jussi.timonen.ext@konecranes.com>1 parent eb4c8b6 commit 581fe68
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
0 commit comments