From: vsr Date: Fri, 19 Nov 2010 13:27:33 +0000 (+0000) Subject: 0020463: EDF 1099 SMESH: performance regression from V4 to V5 X-Git-Tag: V5_1_5~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da675994d2a3f9dda88cc2e7d35c497f43f3fce9;p=modules%2Fsmesh.git 0020463: EDF 1099 SMESH: performance regression from V4 to V5 Patch from Erwan ADAM. --- diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index d1638dd86..5a82382d6 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -923,7 +923,30 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP if(!hasAttr) aNewParams = anInputParams; else - aNewParams = aOldParameters+"|"+anInputParams; + { + int pos = aOldParameters.SearchFromEnd("|"); + if(pos==-1) pos = 0; + TCollection_AsciiString previousParamFull(aOldParameters.Split(pos)); + TCollection_AsciiString previousParam(previousParamFull); + TCollection_AsciiString theRepet("1"); + pos = previousParam.SearchFromEnd(";*="); + if(pos >= 0) + { + theRepet = previousParam.Split(pos+2); + pos = pos-1; + if(pos==-1) pos = 0; + previousParam.Split(pos); + } + if(previousParam == anInputParams) + { + theRepet = theRepet.IntegerValue()+1; + aNewParams = aOldParameters + previousParam + ";*=" + theRepet; + } + else + { + aNewParams = aOldParameters + previousParamFull + "|" + anInputParams; + } + } if(VARIABLE_DEBUG) {