Performance improvements ensemble curves

* Do not create ensemble in initAfterRead
* Check if filter is active before update
* Do not recompute statistics on every loadData
* Removes unnecessary resampling
* MSVC: Add support for dynamic deoptimalization
* Make sure RFT plots are initialized based on curves in project file
* Make sure the progress dialog is always on top
* Add more progress info when loading project file
* Make sure names in RFT plots are updated
This commit is contained in:
Magne Sjaastad
2025-05-28 15:10:43 +02:00
committed by GitHub
parent 6da41a4c5a
commit 118ecf941a
10 changed files with 78 additions and 14 deletions
@@ -469,6 +469,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
{
// First Close the current project
caf::ProgressInfo progress( 7, "Loading Project File" );
progress.setProgressDescription( "Reading Project Structure from File" );
closeProject();
onProjectBeingOpened();
@@ -541,6 +544,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
m_preferences->writePreferencesToApplicationStore();
}
progress.incrementProgress();
progress.setProgressDescription( "Loading Grid Data" );
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
{
RimOilField* oilField = m_project->oilFields[oilFieldIdx];
@@ -598,6 +604,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
oilField->polygonCollection()->loadData();
}
progress.incrementProgress();
progress.setProgressDescription( "Loading 2D Plot Data" );
{
RimMainPlotCollection* mainPlotColl = RimMainPlotCollection::current();
mainPlotColl->ensureDefaultFlowPlotsAreCreated();
@@ -650,6 +659,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
oilField->surfaceCollection()->loadData();
}
progress.incrementProgress();
progress.setProgressDescription( "Calculation Grid Statistics" );
// If load action is specified to recalculate statistics, do it now.
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will
// be clamped
@@ -666,6 +678,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
}
}
progress.incrementProgress();
progress.setProgressDescription( "Create 3D Views" );
// Now load the ReservoirViews for the cases
// Add all "native" cases in the project
std::vector<RimCase*> casesToLoad = m_project->allGridCases();
@@ -773,6 +788,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
}
}
progress.incrementProgress();
progress.setProgressDescription( "Load Summary Data" );
// Init summary case groups
for ( RimOilField* oilField : m_project->oilFields )
{
@@ -803,6 +821,9 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
// Default behavior for scripts is to use current active view for data read/write
onProjectOpened();
progress.incrementProgress();
progress.setProgressDescription( "Performing Grid Calculations" );
// Recalculate the results from grid property calculations.
// Has to be done late since the results are filtered by view cell visibility
for ( auto gridCalculation : m_project->gridCalculationCollection()->sortedGridCalculations() )