mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Remove List.ForEach on hot path. (#467)
* Remove LINQ on hot path. * Fixed erroneous classification of List.ForEach as LINQ. * Added back using so that it could be removed by #452.
This commit is contained in:
parent
d9a64c62b7
commit
dbd5f57e96
@ -394,7 +394,13 @@ public void ClearAllDirtyBits()
|
||||
syncVarDirtyBits = 0L;
|
||||
|
||||
// flush all unsynchronized changes in syncobjects
|
||||
m_SyncObjects.ForEach(obj => obj.Flush());
|
||||
// note: don't use List.ForEach here, this is a hot path
|
||||
// List.ForEach: 432b/frame
|
||||
// for: 231b/frame
|
||||
for (int i = 0; i < m_SyncObjects.Count; ++i)
|
||||
{
|
||||
m_SyncObjects[i].Flush();
|
||||
}
|
||||
}
|
||||
|
||||
internal bool AnySyncObjectDirty()
|
||||
|
Loading…
Reference in New Issue
Block a user