From e8b4fbd5052abb04bfaf80eb5f4a0a19ee4ffa94 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 20 Jun 2016 15:41:04 +0200 Subject: [PATCH] Improve perf for meshes with huge number of grps/families. --- src/MEDLoader/MEDFileMesh.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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()); -- 2.39.2