mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Performance updates (#9082)
* Avoid creation of curve legend widgets during construction of a multi plot * Make sure default z-value is correct to avoid expensive Qwt updates * Avoid duplicate plot updates * Do not create internal Qwt legend by default * RFT import: Avoid expensive method throwing exception if no data is found
This commit is contained in:
@@ -520,9 +520,14 @@ void RifReaderOpmRft::buildSegmentBranchTypes( const RftSegmentKey& segmentKey )
|
||||
std::vector<int>
|
||||
RifReaderOpmRft::importWellData( const std::string& wellName, const std::string& propertyName, const RftDate& date ) const
|
||||
{
|
||||
// PERFORMANCE NOTE
|
||||
// Use method hasRft() that do not throw exception if RFT data is not available. Using this method and avoid
|
||||
// try/catch and exceptions is way faster.
|
||||
if ( !m_opm_rft->hasRft( wellName, date ) ) return {};
|
||||
|
||||
try
|
||||
{
|
||||
// THe hasArray method can throw, so we must use a try/catch block here
|
||||
// The hasArray method can throw, so we must use a try/catch block here
|
||||
if ( m_opm_rft->hasArray( propertyName, wellName, date ) )
|
||||
{
|
||||
return m_opm_rft->getRft<int>( propertyName, wellName, date );
|
||||
|
||||
Reference in New Issue
Block a user