Commit d8fabf5
fix: Replaced HashSet.UnionWith() with loop in NetworkBehaviourUpdate() to avoid heap alloc (#3568)
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
Requires up-port
---------
Co-authored-by: Emma <[email protected]>1 parent caac92d commit d8fabf5
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 | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
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