I noticed the RuntimeManager has GC Alloc of a few hundred bytes per frame which isn't a lot but it is an unnecessary distraction for anyone optimizing performance.
For example, RunTimeManager calls GetSetting in Settings.cs, which has the line
T t = list.Find((x) => x.Platform == platform);
which causes the alloc. A simple utility like below would avoid this:
T FindInList<T>(List<T> list, Predicate<T> predicate)
{
for (var i = 0; i < list.Count; i++)
{
var item = list[i];
if (predicate(item))
{
return item
}
}
return default(T);
}
Can anyone provide clarity as to where such a utility would go / how it should be set up for the coding style of this project? A new file called "BasicUtilities.cs" perhaps?
I noticed the RuntimeManager has GC Alloc of a few hundred bytes per frame which isn't a lot but it is an unnecessary distraction for anyone optimizing performance.
For example, RunTimeManager calls GetSetting in Settings.cs, which has the line
which causes the alloc. A simple utility like below would avoid this:
Can anyone provide clarity as to where such a utility would go / how it should be set up for the coding style of this project? A new file called "BasicUtilities.cs" perhaps?