From 630db7112a43b4312cee960390c6dceafc161ea2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 22 Nov 2017 02:07:23 +0100 Subject: [PATCH] Leaner iteration in Profiler::Dequeue(). --- client/TracyProfiler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index fdb0beec..904a98b4 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -264,9 +264,10 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token ) const auto sz = s_queue.try_dequeue_bulk( token, m_itemBuf, BulkSize ); if( sz > 0 ) { - for( size_t i=0; ihdr.type ) { @@ -288,7 +289,8 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token ) default: break; } - if( !AppendData( item, QueueDataSize[m_itemBuf[i].hdr.idx] ) ) return ConnectionLost; + if( !AppendData( item, QueueDataSize[item->hdr.idx] ) ) return ConnectionLost; + item++; } } else