From: eap Date: Wed, 11 Apr 2018 11:19:02 +0000 (+0300) Subject: 0023544: SMESH's performance issues X-Git-Tag: V8_5_0rc1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5ebdbe87e2c7f21e10a0db66022e6ca0f9ad1c5;p=modules%2Fsmesh.git 0023544: SMESH's performance issues --- diff --git a/src/SMDS/SMDS_ElementFactory.hxx b/src/SMDS/SMDS_ElementFactory.hxx index b25b635c8..3dbc1ab17 100644 --- a/src/SMDS/SMDS_ElementFactory.hxx +++ b/src/SMDS/SMDS_ElementFactory.hxx @@ -266,8 +266,13 @@ struct _RangeSet */ attr_t SetValue( int theIndex, attr_t theValue ) { - set_iterator rNext = mySet.upper_bound( theIndex ); + set_iterator rNext = mySet.end(); // case of adding elements set_iterator r = rNext - 1; + if ( r->my1st > theIndex ) + { + rNext = mySet.upper_bound( theIndex ); + r = rNext - 1; + } int rSize = Size( r ); // range size attr_t rValue = r->myValue; if ( rValue == theValue )