From: Anthony Geay Date: Mon, 20 Jun 2016 13:41:04 +0000 (+0200) Subject: Improve perf for meshes with huge number of grps/families. X-Git-Tag: V8_1_0a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e8b4fbd5052abb04bfaf80eb5f4a0a19ee4ffa94;p=tools%2Fmedcoupling.git Improve perf for meshes with huge number of grps/families. --- diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index bd2fb0e24..90c34e17e 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -1432,11 +1432,10 @@ void MEDFileMesh::setGroupInfo(const std::map::const_iterator it=_families.find(oname); - std::vector fams=getFamiliesNames(); + std::map::const_iterator it=_families.find(name); if(it==_families.end()) { + std::vector fams(getFamiliesNames()); std::ostringstream oss; oss << "No such familyname \"" << name << "\" !\nAvailable families are :"; std::copy(fams.begin(),fams.end(),std::ostream_iterator(oss," ")); throw INTERP_KERNEL::Exception(oss.str().c_str());