Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #8634. Add caching of names in FunctionFactory::getFunctionNames.
This method was fairly expensive because it had to create an instance of every registered function every time to find out if it's the requested type. This method is called to create validators in various algorithm init methods, which can be called a lot it - for example - the algorithm is used as a sub-algorithm in a loop within another algorithm. It's now cached in a map that's a member of FunctionFactoryImpl. The caching had to be made thread-safe with a mutex. On the plus side this allows the resulting vector to be returned by reference-to-const.
- Loading branch information
1 parent
0651b06
commit 4c089bf
Showing
1 changed file
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters