From e81218ddaf58fad194f68a5211ca278b2eb6ce9e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 1 Sep 2018 14:50:38 +0200 Subject: [PATCH] Radically improve frame set histogram performance. This change exploits the fact that frame set data is sorted, and the histogram bins can be calculated as distances in the frame-time vectors. --- server/TracyView.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 741b61e6..536079d7 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6457,26 +6457,32 @@ void View::DrawInfo() if( m_frameSortData.logTime ) { - const auto tMinLog = log10fast( tmin ); - const auto idt = numBins / ( log10fast( tmax ) - tMinLog ); + const auto tMinLog = log10( tmin ); + const auto zmax = ( log10( tmax ) - tMinLog ) / numBins; auto fit = frames.begin(); while( fit != frames.end() && *fit == 0 ) fit++; - while( fit != frames.end() ) + for( int64_t i=0; i