#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 committed 2021-10-21 14:21:16 +02:00
1 parent 9940b4ea50
commit 6b13a31349
10 files changed
+135 -39

No files matched your search

@@ -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() )
{