From: Dodji Seketeli Date: Mon, 8 Jul 2019 15:00:17 +0000 (+0200) Subject: [xml-writter] Speedup function_type::get_cached_name X-Git-Tag: libabigail-1.7~72 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7699dfc921d248fa6d5cbdbeab9d501b17ef3f52;p=platform%2Fupstream%2Flibabigail.git [xml-writter] Speedup function_type::get_cached_name It looks like due to a typo, we are never caching the name of the function_type, so we are computing it all the time, *OOOPS*. So this is having an impact when comparing instance of function_type during de-duplication at abixml writting time. Things are faster now, thanks to this patch. * src/abg-ir.cc (function_type::get_cached_name): Really cache the computed name of function_type instances. Signed-off-by: Dodji Seketeli --- diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 19b8082..aef520f 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -15698,13 +15698,13 @@ function_type::get_cached_name(bool internal) const { if (internal) { - if (!get_naked_canonical_type() || priv_->internal_cached_name_.empty()) + if (priv_->internal_cached_name_.empty()) priv_->internal_cached_name_ = get_function_type_name(this, internal); return priv_->internal_cached_name_; } - if (!get_naked_canonical_type() || priv_->cached_name_.empty()) + if (priv_->cached_name_.empty()) priv_->cached_name_ = get_function_type_name(this, internal); return priv_->cached_name_;