Make perf.log output for ticking things opt-in
Both writing to perf.log frequently as well as GetTimestamp aren't free and hurt performance particularly on slower systems (which can have notably higher output to perf.log, further amplifying the problem). Therefore we make simulation perf logging opt-in. Additionally, logging of the current tick and tick type (local/net) is removed from debug.log, and some remnant debug logging for kills and pips is removed to keep performance-sensitive logging limited to perf.log.
This commit is contained in:
@@ -67,11 +67,10 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
var pi = c.Info.TraitInfo<PassengerInfo>();
|
||||
if (n < pi.Weight)
|
||||
{
|
||||
var sequence = Info.FullSequence;
|
||||
if (pi.CustomPipType != null && !Info.CustomPipSequences.TryGetValue(pi.CustomPipType, out sequence))
|
||||
Log.Write("debug", "Actor type {0} defines a custom pip type {1} that is not defined for actor type {2}".F(c.Info.Name, pi.CustomPipType, self.Info.Name));
|
||||
if (pi.CustomPipType != null && Info.CustomPipSequences.TryGetValue(pi.CustomPipType, out var sequence))
|
||||
return sequence;
|
||||
|
||||
return sequence;
|
||||
return Info.FullSequence;
|
||||
}
|
||||
|
||||
n -= pi.Weight;
|
||||
|
||||
Reference in New Issue
Block a user