Performance: Slow performance for some plot and curve operations

* Performance: Cache registry value
* Performance: Avoid recursive update
Early return if values are identical
updateConnectedEditors is handled by setValueFromUiEditor
Avoid fieldChanged in analyzePlotsAndAdjustAppearanceSettings
This commit is contained in:
Magne Sjaastad authored and GitHub committed 2023-08-25 10:39:19 +02:00
1 parent d198dc8537
commit 3800246b79
8 files changed
+20 -13

No files matched your search

@@ -1269,6 +1269,8 @@ void RimSummaryMultiPlot::analyzePlotsAndAdjustAppearanceSettings()
bool canShowOneAxisTitlePerRow = analyzer.isSingleQuantityIgnoreHistory() && ( m_axisRangeAggregation() != AxisRangeAggregation::NONE );
const bool notifyFieldChanged = false;
for ( auto p : summaryPlots() )
{
auto timeAxisProp = p->timeAxisProperties();
@@ -1276,7 +1278,7 @@ void RimSummaryMultiPlot::analyzePlotsAndAdjustAppearanceSettings()
auto tickMarkCount = ( columnCount() < 3 ) ? RimPlotAxisProperties::LegendTickmarkCount::TICKMARK_DEFAULT
: RimPlotAxisProperties::LegendTickmarkCount::TICKMARK_FEW;
timeAxisProp->setAutoValueForMajorTickmarkCount( tickMarkCount );
timeAxisProp->setAutoValueForMajorTickmarkCount( tickMarkCount, notifyFieldChanged );
for ( auto* axisProp : p->plotYAxes() )
{
@@ -1285,7 +1287,7 @@ void RimSummaryMultiPlot::analyzePlotsAndAdjustAppearanceSettings()
auto tickMarkCount = ( rowsPerPage() == 1 ) ? RimPlotAxisProperties::LegendTickmarkCount::TICKMARK_DEFAULT
: RimPlotAxisProperties::LegendTickmarkCount::TICKMARK_FEW;
axisProp->setAutoValueForMajorTickmarkCount( tickMarkCount );
axisProp->setAutoValueForMajorTickmarkCount( tickMarkCount, notifyFieldChanged );
axisProp->computeAndSetAutoValueForScaleFactor();