From 8351f7c1a5810b600f6b58e65e01356f23abedb8 Mon Sep 17 00:00:00 2001 From: Christian Heinemann Date: Mon, 23 Sep 2024 08:11:14 +0200 Subject: [PATCH] performance for real-time plot improved --- source/Gui/EditorModel.h | 2 +- source/Gui/StatisticsWindow.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Gui/EditorModel.h b/source/Gui/EditorModel.h index 0a91b72bf..69aa3bf3e 100644 --- a/source/Gui/EditorModel.h +++ b/source/Gui/EditorModel.h @@ -48,5 +48,5 @@ class _EditorModel float _pencilWidth = 3.0f; int _defaultColorCode = 0; bool _rolloutToClusters = true; - bool _forceNoRollout = false;; + bool _forceNoRollout = false; }; \ No newline at end of file diff --git a/source/Gui/StatisticsWindow.cpp b/source/Gui/StatisticsWindow.cpp index 92bb8fa54..23708378d 100644 --- a/source/Gui/StatisticsWindow.cpp +++ b/source/Gui/StatisticsWindow.cpp @@ -511,6 +511,7 @@ void _StatisticsWindow::processBackground() auto timepoint = std::chrono::steady_clock::now(); auto duration = _lastTimepoint.has_value() ? static_cast(std::chrono::duration_cast(timepoint - *_lastTimepoint).count()) : 0; if(!_lastTimepoint || duration > LiveStatisticsDeltaTime) { + _lastTimepoint = timepoint; auto rawStatistics = _simController->getRawStatistics(); _histogramLiveStatistics.update(rawStatistics.histogram); _timelineLiveStatistics.update(rawStatistics.timeline, _simController->getCurrentTimestep());