Problem Description
The Render() method of the LogDisplayGridComponent currently invokes fmt for every invocation and also recomputes the ISO 8601 date time representation which is rather inefficient.
Proposed Solution
Implement a CART cache for both date time strings and formatted record messages in order to improve performance.
Possible Alternative Approaches
One could also preformat all records before handing them to LogDisplayGridComponent, however, this would split the formatting responsibility between different components in addition to increasing load times which I'd like to avoid.
Additional Context
The bad performance of the current solution has been observed while profiling a different issue, but the concrete numbers currently escape my mind.
Problem Description
The
Render()method of theLogDisplayGridComponentcurrently invokesfmtfor every invocation and also recomputes the ISO 8601 date time representation which is rather inefficient.Proposed Solution
Implement a CART cache for both date time strings and formatted record messages in order to improve performance.
Possible Alternative Approaches
One could also preformat all records before handing them to
LogDisplayGridComponent, however, this would split the formatting responsibility between different components in addition to increasing load times which I'd like to avoid.Additional Context
The bad performance of the current solution has been observed while profiling a different issue, but the concrete numbers currently escape my mind.