Skip parsing PropertyNames when empty Parameters#7960
Conversation
We can totally get rid of that, especially because right now we don't even target .NET 8 so that compiler directive never gets hit. We're probably going to go straight to .NET 10 for v1.6.
That's probably a bug that our test suite doesn't hit because rendering isn't done via that method, but rather through the template extraction system. |
|
Appreciate the PR @snakefoot - happy to accept more for some of the other suggestions you have RE: the semantic logger. That's new code so there's probably room for improvement in there. |
The |
|
Notice your last-minute code-simplify reverts the optimization. Have created #7968 to redo the optimization. |
* Skip parsing PropertyNames when not Parameters * Simplify code --------- Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>
* Skip parsing PropertyNames when not Parameters * Simplify code --------- Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>
Removed unnecessary casting to array, since it will automatically match
IReadOnlyList<object>.Curious why you also convert into FrozenDictionary (another allocation that hurt performance). Since a LogEvent is a very temporary object, that is thrown away. FrozenDictionary are "expensive" to create, because you plan to hold on to them.
akka.net/src/core/Akka/Event/LogMessage.cs
Lines 145 to 150 in f2fe27b
I find it strange that when calling Akka's LogMessage.ToString() and using semantic logging, then Akka-Formatter explodes in your face (Because
string.Formatonly handles positional parameters).Also strange that Akka LogMessage only supports message-template-properties. I find message-template properties very organic and error-prone (case-sensitive, spelling, etc.) compared to explicit "building" the LogEvent.