Commit 476f113
Address PR feedback: reduce allocations and normalize empty edges
- Change RewriteId to return IEnumerable<string> using Enumerable.Repeat
instead of allocating a new HashSet for every non-bare id
- Normalize empty edge sets to null after self-edge filtering to match
the existing serialization convention in GraphTranslationUtility
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a83d0a8 commit 476f113
1 file changed
Lines changed: 10 additions & 3 deletions
File tree
- src/Microsoft.ComponentDetection.Orchestrator/Services/GraphTranslation
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | | - | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
| |||
0 commit comments