From 626f2aee7aacacc8b92d46880e3576d3e263239c Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 24 Feb 2012 10:52:50 +0000 Subject: [PATCH] 0021208: Performance issue when loading SMESH with an hdf file containing a big mesh don't call GetTypes() of GroupOnFilter that can be very long --- src/SMESHGUI/SMESHGUI_Utils.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_Utils.cxx b/src/SMESHGUI/SMESHGUI_Utils.cxx index 53e4bb38c..e3c3dac93 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.cxx +++ b/src/SMESHGUI/SMESHGUI_Utils.cxx @@ -315,9 +315,12 @@ namespace SMESH SObjectToInterface( aSObj1 ); const bool isGroupOnFilter = !gof->_is_nil(); - SMESH::array_of_ElementType_var elemTypes = idSrc->GetTypes(); - const bool isEmpty = ( elemTypes->length() == 0 ); - + bool isEmpty = false; + if ( !isGroupOnFilter ) // GetTypes() can be very long on isGroupOnFilter! + { + SMESH::array_of_ElementType_var elemTypes = idSrc->GetTypes(); + isEmpty = ( elemTypes->length() == 0 ); + } if ( isEmpty ) aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN"); else if ( objType != GROUP ) -- 2.39.2