From 6aa9169901c402f26cac37c02a8220957a9134dc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 25 Apr 2023 00:27:17 +0200 Subject: [PATCH] Reduce number of plot samples from 1024 to 256. Having 1024 samples proved to be too slow. --- server/TracyTimelineItemPlot.cpp | 2 +- server/TracyView_Plots.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyTimelineItemPlot.cpp b/server/TracyTimelineItemPlot.cpp index c621edd7..7e6a4bee 100644 --- a/server/TracyTimelineItemPlot.cpp +++ b/server/TracyTimelineItemPlot.cpp @@ -192,7 +192,7 @@ void TimelineItemPlot::Preprocess( const TimelineContext& ctx, TaskDispatch& td, else { // Sync with View::DrawPlot()! - constexpr int NumSamples = 1024; + constexpr int NumSamples = 256; uint32_t samples[NumSamples]; uint32_t cnt = 0; uint32_t offset = it - vec.begin(); diff --git a/server/TracyView_Plots.cpp b/server/TracyView_Plots.cpp index 76334f09..b3cd8cd1 100644 --- a/server/TracyView_Plots.cpp +++ b/server/TracyView_Plots.cpp @@ -158,7 +158,7 @@ bool View::DrawPlot( const TimelineContext& ctx, PlotData& plot, const std::vect if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( x - 2, offset ), wpos + ImVec2( x + 2, offset + PlotHeight ) ) ) { - constexpr int NumSamples = 1024; + constexpr int NumSamples = 256; ImGui::BeginTooltip(); TextFocused( "Number of values:", RealToString( cnt ) ); if( cnt < NumSamples )