1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Sort plot data only when needed (i.e. to draw).

This commit is contained in:
Bartosz Taudul
2021-11-14 13:01:27 +01:00
parent 68d2812e82
commit b978a7c652
3 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -6600,7 +6600,8 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
auto yPos = wpos.y + offset;
if( yPos + PlotHeight >= yMin && yPos <= yMax )
{
const auto& vec = v->data;
auto& vec = v->data;
if( !vec.is_sorted() ) vec.sort();
if( v->type == PlotType::Memory )
{