libabigail/include
Dodji Seketeli 1add2fea50 ir: Cache the pretty representation used during pre-canonicalization type sorting
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>
2024-06-21 18:43:53 +02:00
..
Makefile.am Add support for BTF 2023-01-06 21:05:53 +01:00
abg-btf-reader.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-comp-filter.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-comparison.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-config.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-corpus.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-ctf-reader.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-cxx-compat.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-diff-utils.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-dwarf-reader.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-elf-based-reader.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-elf-reader.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-fe-iface.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-fwd.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-hash.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-ini.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-interned-str.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-ir.h ir: Cache the pretty representation used during pre-canonicalization type sorting 2024-06-21 18:43:53 +02:00
abg-libxml-utils.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-reader.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-regex.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-reporter.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-sptr-utils.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-suppression.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-tools-utils.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-traverse.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-version.h.in abidw: Add --abixml-version 2021-11-12 18:31:28 +01:00
abg-viz-common.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-viz-dot.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-viz-svg.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-workers.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00
abg-writer.h Update Copyright for year 2024 2024-04-26 15:29:50 +02:00