OldUnreal / UnrealTournamentPatches

Other
999 stars 29 forks source link

[469c] Make report for access None and other similar errors, summarized #1336

Open SeriousBuggie opened 1 year ago

SeriousBuggie commented 1 year ago

Some code written so bad, so able produce for 58 seconds, 467 MB log data of same messages: stijn-volckaert/udemo/issues/132

So will be good idea, instead of direct flood in the log, make check on some buffer, and if this error already appear, then just increase counter. And within some interval flush buffer info into log.

For example, on example above there 36 really different messages. So if plush happen even once per second, this mean only 2000 messages, not 2 700 000 of it. And this demo will be playable, and even with decent fps.

Honestly I not see any profit of such flood in log. Nobody win from it. One exclude is debug. So for UTrace, need flood as before.

For other enough message like:

In last N seconds happen next erors:
200 ScritptLog: Class AAA Accesses None in filed BBB
30 Warning: Code at position XXX do bad thing YYY

And so on.

Such change allow deal with bad code base which nobody will/able fix it. Esp for demo - which already recoded on this bad code base.

Also it allow servers work longer, since it less flood logs and eat less space. And consume less resources. Honestly same line appear dozen times in server log, not make more info like this line appear few times with counter.

an-eternity commented 1 year ago

This feature has already been implemented in XC engine. It replaced all the flood by a short message, for example, like this:

Warning: ImportText: Struct missing '(' XC_Engine: === Last line repeats 16 times.

It was very useful, but it was able to filter only a simple flood. For example, in case if there were several instances generating a flood at the same time, that feature wasn't effective... (at least up to build 24, as far as i know)

SeriousBuggie commented 1 year ago

Yes. In related example flood goes repeatedly. Not just one line in bunch time.

Also this solution come too later. We need not waste resource as more early as possible. If this create log lines, but just not write them to disk, this too create impact, since work with strings too expensive itself.