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:
Magne Sjaastad
2022-06-07 21:09:36 +02:00
committed by GitHub
parent fa1f189709
commit d36bf11c62
17 changed files with 331 additions and 82 deletions

View File

@@ -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();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------