Page 1 of 1

Chatty Log File

Posted: Tue Feb 03, 2015 12:49 am
by ggrotz
I think this is going to be an Unreal issue more than TNM issue, but something I'm noticing in my latest running of TNM is that the log files are getting HUGE. It seems to slow down the loading of the game as well when one already exists. To wit, when I deleted one (about 122MB or so), the game finally loaded up in a reasonable time frame. The last one I checked on was 16MB. And the log file after loading the game to just check the safe in the other thread (again) was 1.85MB.

While the logs are endless warning messages (which probably should be explored if TNM isn't abandonware), is there any way to mitigate the effects of this upon the game?

Re: Chatty Log File

Posted: Tue Feb 03, 2015 12:22 pm
by bjorn98009_91
Writing to the log file takes time, since everything is singletreaded this means that game performance suffers. One should especially not do writing in timers, ticks or other places where code runs a lot.

Do the Warning messages have a tag assigned to them? If so it might be possible to use Suppress in order to prevent them from being written to the log, this won't be as good as avoiding to use "log" but it would be better then doing nothing.

If no tag at all, then there isn't much to be done, short of decompiling the TNM packages, and commenting out/adding tags to the log messages.

Re: Chatty Log File

Posted: Tue Feb 03, 2015 7:53 pm
by ggrotz
bjorn98009_91 wrote:Writing to the log file takes time, since everything is singletreaded this means that game performance suffers. One should especially not do writing in timers, ticks or other places where code runs a lot.

Do the Warning messages have a tag assigned to them? If so it might be possible to use Suppress in order to prevent them from being written to the log, this won't be as good as avoiding to use "log" but it would be better then doing nothing.
Yeah, 2.95MB in the time it took me to check that fireplace means quite a lot gets written in a short period of time. Here's a sample:

Code: Select all

ScriptWarning: ScaraKing 20_WCFloor4.ScaraKing0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity2 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity1 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity3 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity4 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ScaraKing 20_WCFloor4.ScaraKing0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity2 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity1 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity3 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity4 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ScaraKing 20_WCFloor4.ScaraKing0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity2 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity1 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity3 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: WCSecurity 20_WCFloor4.WCSecurity4 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ScaraKing 20_WCFloor4.ScaraKing0 (Function TNM.TNMPawn.Tick:0069) Accessed None
Another block. Same problem, but different map. Basically put, same thing on every map I've explicitly checked.

Code: Select all

ScriptWarning: Breadfan 23_ABIInterior.Breadfan0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ABISecurityGuard 23_ABIInterior.ABISecurityGuard1 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ABIFemaleGuard 23_ABIInterior.ABIFemaleGuard0 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ABIFemaleGuard 23_ABIInterior.ABIFemaleGuard1 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ABISecurityGuard 23_ABIInterior.ABISecurityGuard2 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ABISecurityGuard 23_ABIInterior.ABISecurityGuard4 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: ABISecurityGuard 23_ABIInterior.ABISecurityGuard6 (Function TNM.TNMPawn.Tick:0069) Accessed None
ScriptWarning: Breadfan 23_ABIInterior.Breadfan0 (Function TNM.TNMPawn.Tick:0069) Accessed None

You get the idea. I've noticed since I discovered the huge logs that some variation of it seems to happen in every case I've done.

Re: Chatty Log File

Posted: Wed Feb 04, 2015 11:26 am
by bjorn98009_91
Woah, seems like someone didn't do their null checks, what's even worse is that this is in Tick. Well I guess there is nothing to do about that, except grab the source/decompile, add some null checks and recompile.

Re: Chatty Log File

Posted: Wed Feb 04, 2015 11:28 am
by Hanfling
If you post TNM.TNMPawn.Tick() function I can take a look at it.

Re: Chatty Log File

Posted: Wed Mar 11, 2015 10:19 am
by that guy
Actually tick is kind of middling in terms of severity. At least you know it's limited to being called once per game loop per instance. Compare that to a low level utility function.