Trace supports LazyLog/LazyPrintf which delays rendering of the event message until (and more importantly if) it is being displayed. This would be useful for EventLog as well, where large messages can cause noticeable slowdown.
I can work on the change if there is agreement on the new API. We can:
add LazyPrintf/LazyErrorf primitives, or
leave the current Printf/Errorf interface as is but document that the string is lazily generated.
Trace supports
LazyLog
/LazyPrintf
which delays rendering of the event message until (and more importantly if) it is being displayed. This would be useful forEventLog
as well, where large messages can cause noticeable slowdown.I can work on the change if there is agreement on the new API. We can:
LazyPrintf/LazyErrorf
primitives, orPrintf/Errorf
interface as is but document that the string is lazily generated.