UI: Fix repeated log entries#11706
Conversation
|
Wouldn't it be much simpler to bite the bullet and run a simple The given solution has the potential for false positives (as it only looks at length and sum of byte values) and adds more complexity, and seems to make an already convoluted system even more convoluted, whereas a string comparison seems to do exactly what is intended (answering the question "is this message identical to the prior message") and would not require any distinctions between Or is there some special use case that makes using a string comparison not viable here? |
|
For strncmp you would need to keep a copy of the previous log message which also needs to get a free somewhere. |
Description
too_many_repeated_entriesdid only detect repeated entries when the format pointer stayed the same.With this change it also detects repeat entries when the format pointer is not the same, but the contents has the same length and the same sum.
Motivation and Context
ffmpeg_loguses aDStrinternal for the format ofblogva, because of that the pointer is different every call andtoo_many_repeated_entrieswould never detect any repeats.How Has This Been Tested?
On windows 11 by having a plugin blog multiple the same messages with different format pointers
Types of changes
Checklist: