mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Several performance fixes (#9026)
* #9023 Performance: Use count instead of for loop * #9023 Analyzer: Cache vector names for categories * #9023 Performance : Use cached ensemble analyzer * #9023 Performance : Add min/max values to ensemble statistics * #9023 Performance : Improve statistics calculator * #9023 Performance : Use high performance toInt() * #9023 Performance : Build summary addresses in parallell
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
#include "RiaStdStringTools.h"
|
||||
#include "RiaSummaryAddressAnalyzer.h"
|
||||
#include "RiaWeightedMeanCalculator.h"
|
||||
|
||||
#include "RicfCommandObject.h"
|
||||
@@ -158,6 +159,7 @@ void RimSummaryCaseCollection::removeCase( RimSummaryCase* summaryCase, bool not
|
||||
m_cases.removeChild( summaryCase );
|
||||
|
||||
m_cachedSortedEnsembleParameters.clear();
|
||||
m_analyzer.reset();
|
||||
|
||||
caseRemoved.send( summaryCase );
|
||||
|
||||
@@ -184,6 +186,7 @@ void RimSummaryCaseCollection::addCase( RimSummaryCase* summaryCase )
|
||||
|
||||
m_cases.push_back( summaryCase );
|
||||
m_cachedSortedEnsembleParameters.clear();
|
||||
m_analyzer.reset();
|
||||
|
||||
// Update derived ensemble cases (if any)
|
||||
std::vector<RimDerivedEnsembleCaseCollection*> referringObjects;
|
||||
@@ -344,6 +347,7 @@ std::set<time_t> RimSummaryCaseCollection::ensembleTimeSteps() const
|
||||
}
|
||||
return allTimeSteps;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -929,6 +933,21 @@ void RimSummaryCaseCollection::updateReferringCurveSets()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryAddressAnalyzer* RimSummaryCaseCollection::addressAnalyzer()
|
||||
{
|
||||
if ( !m_analyzer )
|
||||
{
|
||||
m_analyzer = std::make_unique<RiaSummaryAddressAnalyzer>();
|
||||
|
||||
m_analyzer->appendAddresses( ensembleSummaryAddresses() );
|
||||
}
|
||||
|
||||
return m_analyzer.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user