


LogToFile(filename, $"[{DateTime.Now}] {Lang(key, null, args)}", this);I tried to pull out all string template parameters and replace them with single variables, but that didn't helped, so i suppose, that the problem is somewhere at the implementation of LogToFile()double start = (DateTime.Now - pluginStartDate).TotalMilliseconds;
Puts("test");
double end = (DateTime.Now - pluginStartDate).TotalMilliseconds;
Puts("Testing took: " + (end - start) + "ms");
If i put this in a Logger.cs file, it tells ~100msJust a tiny snippet of what spams my server all day when this plugin runs. The delays this plugin causes forcing me not to use it.
Aracelis[15718970/1981403] was killed by Explosion
Reiko[15719005/5641353] was killed by Explosion
Remedios[15719039/7422587] was killed by Explosion
Calling 'OnServerCommand' on 'Logger v2.2.1' took 155ms
<color=#aff>[saddletest[15582816]] SwitchParent Missed horse.corpse[15763413]</color=#aff>
<color=#aff>[saddletest[15582814]] SwitchParent Missed horse.corpse[15764461]</color=#aff>
Calling 'OnItemCraftFinished' on 'Logger v2.2.1' took 135ms
<color=#aff>[saddletest[15583242]] SwitchParent Missed horse.corpse[15766055]</color=#aff>
<color=#aff>[saddletest[15583904]] SwitchParent Missed horse.corpse[15766702]</color=#aff>
Aleen[15199638/8833877] was killed by Blunt
[CHAT] Smoke[13073290/76561197973168969] : I now have electricity.
Calling 'OnItemCraftFinished' on 'Logger v2.2.1' took 133ms
<color=#aff>[saddletest[15585824]] SwitchParent Missed horse.corpse[15775336]</color=#aff>
Calling 'OnItemCraftFinished' on 'Logger v2.2.1' took 160ms
Calling 'OnItemCraftFinished' on 'Logger v2.2.1' took 156ms
<color=#aff>[saddletest[15589954]] SwitchParent Missed horse.corpse[15780648]</color=#aff>
<color=#aff>[saddletest[15588983]] SwitchParent Missed horse.corpse[15781459]</color=#aff>
<color=#aff>[saddletest[15589384]] SwitchParent Missed horse.corpse[15781692]</color=#aff>
Calling 'OnServerCommand' on 'Logger v2.2.1' took 161ms
Calling 'OnServerCommand' on 'Logger v2.2.1' took 127ms
Calling 'OnServerCommand' on 'Logger v2.2.1' took 160ms
<color=#aff>[saddletest[15589952]] SwitchParent Missed horse.corpse[15784247]</color=#aff>
Calling 'OnServerCommand' on 'Logger v2.2.1' took 162ms
Calling 'OnServerCommand' on 'Logger v2.2.1' took 162ms
Calling 'OnServerCommand' on 'Logger v2.2.1' took 164ms
Calling 'OnServerCommand' on 'Logger v2.2.1' took 162ms
Calling 'OnServerCommand' on 'Logger v2.2.1' took 161ms
squirrelof09I removed all log files and it still does this on everything thing that would cause a log write.
It's not a machine issue, it's something with the mod thatn optimizing.
What is causing this?
It and the method it uses for logging is not optimized, so it will potentially trigger hook warnings, especially if the server is already bogged down.