From aa22e0610c67dd86a54f7d7cab7987c399be4c46 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Thu, 4 Dec 2014 16:42:00 +0100 Subject: Don't interpolate pressure while dragging waypoints A profiler session in the planner shows that for deep long dives a significant amount of CPU time is spent in populate_pressure_information() which interpolates the cylinder pressure graphs. This patch introduces a "fast" flag for the replot of the profile which is active while the mouse button is still pressed and that suppresses this calculation. In the future, this flag could be used for other responsiveness tunings of the plot. Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 347cc1bf8..869a2ed5c 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -492,7 +492,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) * shown. */ plotInfo = calculate_max_limits_new(&displayed_dive, currentdc); - create_plot_info_new(&displayed_dive, currentdc, &plotInfo); + create_plot_info_new(&displayed_dive, currentdc, &plotInfo, !shouldCalculateMaxDepth); if(shouldCalculateMaxTime) maxtime = get_maxtime(&plotInfo); -- cgit v1.2.3-70-g09d2