#8143 Performance: Avoid parsing grid GRDECL file twice

Previous implementation parsed grid file twice both for geometry data and properties.
This commit is contained in:
Magne Sjaastad
2021-10-21 13:13:01 +02:00
parent 9940b4ea50
commit 6b13a31349
10 changed files with 135 additions and 39 deletions

View File

@@ -678,8 +678,6 @@ void RimEclipseCase::loadAndSyncronizeInputProperties( bool importGridOrFaultDat
filenames.push_back( fileName );
}
if ( importGridOrFaultData ) filenames.push_back( gridFileName() );
RifEclipseInputPropertyLoader::loadAndSyncronizeInputProperties( inputPropertyCollection(),
eclipseCaseData(),
filenames,

View File

@@ -111,6 +111,8 @@ bool RimEclipseInputCase::openDataFileSet( const QStringList& fileNames )
std::vector<QString> allErrorMessages;
QString gridFileName;
// First find and read the grid data
if ( this->eclipseCaseData()->mainGrid()->gridPointDimensions() == cvf::Vec3st( 0, 0, 0 ) )
{
@@ -120,6 +122,7 @@ bool RimEclipseInputCase::openDataFileSet( const QStringList& fileNames )
if ( RifEclipseInputFileTools::openGridFile( fileNames[i], this->eclipseCaseData(), importFaults, &errorMessages ) )
{
setGridFileName( fileNames[i] );
gridFileName = fileNames[i];
QFileInfo gridFileName( fileNames[i] );
QString caseName = gridFileName.completeBaseName();
@@ -154,6 +157,8 @@ bool RimEclipseInputCase::openDataFileSet( const QStringList& fileNames )
std::vector<QString> filesToRead;
for ( const QString& filename : fileNames )
{
if ( filename == gridFileName ) continue;
bool exists = false;
for ( const QString& currentFileName : additionalFiles() )
{