From 0c086e3a30839d845b1b1f49ba48ed85666a5ba1 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 1 Sep 2018 13:34:02 +0200 Subject: [PATCH] In-place merge new frames instead of re-sorting the whole set. --- server/TracyView.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 2bf87ae7..8341e0af 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6357,25 +6357,32 @@ void View::DrawInfo() const auto fsz = m_worker.GetFullFrameCount( *m_frames ); if( fsz != 0 ) { - if( m_frameSortData.frameSet != m_frames || m_frameSortData.frameNum != fsz ) + if( m_frameSortData.frameSet != m_frames ) { m_frameSortData.frameSet = m_frames; - m_frameSortData.frameNum = fsz; - - m_frameSortData.data.resize( fsz ); - auto ptr = m_frameSortData.data.data(); - int64_t total = 0; - for( size_t i=0; i