mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-23 01:06:56 +00:00
Profiling showed that during pre-canonicalization types sorting (which uses type_topo_comp and decl_topo_comp sorting functors) we spend a lot of time computing the pretty representation of types and decls invoked from type_topo_comp::operator() and decl_topo_comp::operator(). This patch thus uses type_base::get_cached_pretty_representation and introduces a new similar decl_base::get_cached_pretty_representation to cache the pretty representation of types and decls and re-use that representation instead of computing it over and over. Together with the previous patch of this series, the time spent to analyze a Linux Kernel tree went from ~ 55 minutes to around 1m15s using a non-optimized build of libabigail. * include/abg-ir.h (decl_base::get_cached_pretty_representation): Declare new member function. * src/abg-ir-priv.h ({type,decl}_topo_comp::operator()): Use {type,decl}_base::get_cached_pretty_representation instead of get_pretty_representation.: * src/abg-ir.cc (decl_base::priv::{internal_cached_repr_, cached_repr}): Define new data members. (decl_base::get_cached_pretty_representation): Define new member function. (type_base::get_cached_pretty_representation): Cache pretty representation even for non-canonicalized types. Fix comments. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-btf-reader.h | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-ctf-reader.h | ||
abg-cxx-compat.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-elf-based-reader.h | ||
abg-elf-reader.h | ||
abg-fe-iface.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-reader.h | ||
abg-regex.h | ||
abg-reporter.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |