mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -678,8 +678,6 @@ void RimEclipseCase::loadAndSyncronizeInputProperties( bool importGridOrFaultDat
|
||||
filenames.push_back( fileName );
|
||||
}
|
||||
|
||||
if ( importGridOrFaultData ) filenames.push_back( gridFileName() );
|
||||
|
||||
RifEclipseInputPropertyLoader::loadAndSyncronizeInputProperties( inputPropertyCollection(),
|
||||
eclipseCaseData(),
|
||||
filenames,
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user