From 31dec96d0c44a4d9fc3044b76e6dfbc1b52e8cad Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 21 Oct 2017 13:58:55 +0200 Subject: [PATCH] Don't calculate min-max range of a large point quantity. --- server/TracyView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index a6aee715..3112a3af 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2481,6 +2481,12 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover ) double min = (*it)->val; double max = (*it)->val; + if( std::distance( it, end ) > 1000000 ) + { + min = v->min; + max = v->max; + } + else { auto tmp = it; ++tmp;