From: eap Date: Fri, 24 Feb 2012 10:30:58 +0000 (+0000) Subject: 0021208: Performance issue when loading SMESH with an hdf file containing a big mesh X-Git-Tag: V6_5_0a1~115 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=abb0ef62f4c90d0d71defe679911c0d708913280;p=modules%2Fsmesh.git 0021208: Performance issue when loading SMESH with an hdf file containing a big mesh + bool IsUpToDate() const; --- diff --git a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx index 3c2b2a36b..cc6f0fa04 100644 --- a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx +++ b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx @@ -135,6 +135,17 @@ int SMESHDS_GroupOnFilter::GetTic() const return GetMesh()->GetMTime() * myPredicateTic; } +//================================================================================ +/*! + * \brief Return false if update() is needed + */ +//================================================================================ + +bool SMESHDS_GroupOnFilter::IsUpToDate() const +{ + return !( myMeshModifTime < GetMesh()->GetMTime() ); +} + //================================================================================ /*! * \brief Updates myElements if necessary @@ -143,7 +154,7 @@ int SMESHDS_GroupOnFilter::GetTic() const void SMESHDS_GroupOnFilter::update() const { - if ( myMeshModifTime < GetMesh()->GetMTime() ) + if ( !IsUpToDate() ) { SMESHDS_GroupOnFilter* me = const_cast( this ); me->myElements.clear(); diff --git a/src/SMESHDS/SMESHDS_GroupOnFilter.hxx b/src/SMESHDS/SMESHDS_GroupOnFilter.hxx index f17917aab..3725c6911 100644 --- a/src/SMESHDS/SMESHDS_GroupOnFilter.hxx +++ b/src/SMESHDS/SMESHDS_GroupOnFilter.hxx @@ -58,6 +58,8 @@ class SMESHDS_EXPORT SMESHDS_GroupOnFilter: public SMESHDS_GroupBase virtual int GetTic() const; + bool IsUpToDate() const; + private: void update() const;