0021208: Performance issue when loading SMESH with an hdf file containing a big mesh

+  bool IsUpToDate() const;
This commit is contained in:
eap 2012-02-24 10:30:58 +00:00
parent 709188eac6
commit abb0ef62f4
2 changed files with 14 additions and 1 deletions

View 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();

View File

@ -58,6 +58,8 @@ class SMESHDS_EXPORT SMESHDS_GroupOnFilter: public SMESHDS_GroupBase
virtual int GetTic() const;
bool IsUpToDate() const;
private:
void update() const;