Please sign in to comment.
LogWidget: Use FixedSizeQueue for a log messages buffer
Messages buffer is intended to be of a fixed capacity (MAX_LOG_LINES), which cannot be achieved by std::queue unless we manually pop() extra elements. std::queue uses std::deque internally which most likely results in allocations performed continuously. FixedSizeQueue keeps a single buffer during its entire lifetime, avoiding any allocations except the ones performed by stored objects.
- Loading branch information...
Showing with 12 additions and 14 deletions.