Salome HOME
0021208: Performance issue when loading SMESH with an hdf file containing a big mesh
authoreap <eap@opencascade.com>
Fri, 24 Feb 2012 10:30:58 +0000 (10:30 +0000)
committereap <eap@opencascade.com>
Fri, 24 Feb 2012 10:30:58 +0000 (10:30 +0000)
+  bool IsUpToDate() const;

src/SMESHDS/SMESHDS_GroupOnFilter.cxx
src/SMESHDS/SMESHDS_GroupOnFilter.hxx

index 3c2b2a36b46035d210c88949fa5f1fa214ece837..cc6f0fa0492ba17b90f1169c233a56a46dccac56 100644 (file)
@@ -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<SMESHDS_GroupOnFilter*>( this );
     me->myElements.clear();
index f17917aabe1089f9f862d3b8113714cd547fcdbf..3725c6911ca43867f3ab2cc5de5e79916d335559 100644 (file)
@@ -58,6 +58,8 @@ class SMESHDS_EXPORT SMESHDS_GroupOnFilter: public SMESHDS_GroupBase
 
   virtual int GetTic() const;
 
+  bool IsUpToDate() const;
+
  private:
 
   void update() const;