Both getNumColorSpaces and getColorSpaceNameByIndex become much slower when using SEARCH_REFERENCE_SPACE_SCENE for example. For instance when using the ACES 1.2 config, PopulateOCIOMenus in ociodisplay goes from 0.74s to 8.1s on my windows workstation (see screenshot below).
This is primarily caused by the string comparison function: ToLower but also the new string allocation (going from getName()'s const char* to const std::string&

Replacing StringUtils::Compare with ::strcmp(...) == 0 cuts most of the cost down (0.9s instead of 8.1s). I think a faster method than the current approach would be needed in cases like these.
Both
getNumColorSpacesandgetColorSpaceNameByIndexbecome much slower when usingSEARCH_REFERENCE_SPACE_SCENEfor example. For instance when using the ACES 1.2 config,PopulateOCIOMenusinociodisplaygoes from 0.74s to 8.1s on my windows workstation (see screenshot below).This is primarily caused by the string comparison function:

ToLowerbut also the new string allocation (going fromgetName()'sconst char*toconst std::string&Replacing
StringUtils::Comparewith::strcmp(...) == 0cuts most of the cost down (0.9s instead of 8.1s). I think a faster method than the current approach would be needed in cases like these.