From 942e72d945fc940063f48c3005a72cc05cbc55a7 Mon Sep 17 00:00:00 2001 From: Philip Craig Date: Sun, 28 Jul 2024 15:10:31 +1000 Subject: [PATCH] Enable abbreviations cache for duplicates This speeds up the initial parsing of units when there are many small units that share abbreviations. This was encountered for postgresql in opensuse/tumbleweed. --- src/loader.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/loader.rs b/src/loader.rs index e0690d4..edf90e6 100644 --- a/src/loader.rs +++ b/src/loader.rs @@ -209,6 +209,7 @@ impl<'a> LoaderInternal<'a> { if let Some(sup_object) = &sup_object { dwarf.load_sup(|id| load_section(Some(id.name()), sup_object, endian, arena_data))?; } + dwarf.populate_abbreviations_cache(gimli::AbbreviationsCacheStrategy::Duplicates); let ctx = Context::from_dwarf(dwarf)?;