Commit 1bcb377
fix: [UpPort] Replaced HashSet.UnionWith() with loop to avoid heap alloc (#3573)
Discovered while profiling a server that had frequent pending dirty
network objects to process
## Changelog
Fixed: Removed heap alloc in NetworkBehaviourUpdate
## Testing and Documentation
- No tests have been added.
- No documentation changes or additions were necessary.
## Backport
This is an up-port of #3568
---------
Co-authored-by: Louis McLaughlin <[email protected]>
Co-authored-by: Noel Stephens <[email protected]>1 parent e7b14c2 commit 1bcb377
File tree
2 files changed
+5
-1
lines changed- com.unity.netcode.gameobjects
- Runtime/Core
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
0 commit comments