Try to avoid `ConfigObject::GetObject(const String&typeName,const String&objName)`
Open
@Akulbanxal is already working on this.
Since Aug 4, 2026.
core/quality
good first issue
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 616
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
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 33e609d7919b79fb2ae7877ab367389045b4dec9.
Additional context
Accidental finding during #10264.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.