1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Reduce number of plot samples from 1024 to 256.

Having 1024 samples proved to be too slow.
This commit is contained in:
Bartosz Taudul 2023-04-25 00:27:17 +02:00
parent 3811c8ace4
commit 6aa9169901
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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 )