Hi, On Wed, 2023-06-21 at 18:24 +0200, Mark Wielaard wrote: > libelf: Replace list of elf_getdata_rawchunk results with a > tree > > elf_getdata_rawchunks did a linear search to see if a chunk was > already fetched. Replace this list with a binary search tree to make > lookup faster when a lot of Elf_Data_Chunk were created. > > * libelf/libelfP.h (Elf_Data_Chunk): Remove next field. > (struct Elf): Change the rawchunks type from Elf_Data_Chunk * > to void *. > * elf_getdata_rawchunk.c (chunk_compare): New static function. > (elf_getdata_rawchunk): Use tsearch instead of a manual linked > list. > * elf_end.c (free_chunk): New static function. > (elf_end): Call tdestroy instead of walking linked list.
I pushed this now. It is also in Fedora Rawhide: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1026cbdd9a But there are some gating issues (nothing to do with the new code though, it seems to be dnf5/annobin/rpminspect issues). I'll try to also push it to centos stream. Cheers, Mark