Try to avoid ConfigObject::GetObject(const String&typeName,const String&objName)
#10274
Labels
ConfigObject::GetObject(const String&typeName,const String&objName)
#10274
Is your feature request related to a problem? Please describe.
That method fetches the Type::Ptr by typeName on every call, using string lookup/comparision.
Describe the solution you'd like
If objects are fetched repeatedly for one and the same type, latter can be cached in a Type::Ptr or similar variable.
See everything of
grep -rnFwe ConfigObject::GetObject lib tools
which takes two non-template args.Describe alternatives you've considered
At best, that variable is static const as in 33e609d.
Additional context
Accidental finding during #10264.
The text was updated successfully, but these errors were encountered: