From: Piotr Dałek Date: Mon, 5 Feb 2018 13:36:11 +0000 (+0100) Subject: common/config: limit calls to normalize_key_name X-Git-Tag: v13.0.2~328^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20318%2Fhead;p=ceph.git common/config: limit calls to normalize_key_name It's not the most expensive thing in that module, but it's redundant in _get_val, as it's later done also in _get_val_generic. And it's still expensive. Signed-off-by: Piotr Dałek --- diff --git a/src/common/config.cc b/src/common/config.cc index cb2a756f036c..9642ccd31117 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -905,8 +905,7 @@ Option::value_t md_config_t::_get_val_generic(const std::string &key) const int md_config_t::_get_val(const std::string &key, std::string *value) const { assert(lock.is_locked()); - std::string normalized_key(ConfFile::normalize_key_name(key)); - Option::value_t config_value = _get_val_generic(normalized_key.c_str()); + auto config_value = _get_val_generic(key); if (!boost::get(&config_value)) { ostringstream oss; if (bool *flag = boost::get(&config_value)) {