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:
Magne Sjaastad authored and GitHub committed 2022-06-24 16:16:46 +02:00
1 parent 5078f4072f
commit b706192ea3
16 files changed
+133 -69

No files matched your search

@@ -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 );