I was asked by mow on #rpm.org to (essentially) "Put up or Shut up"
Attached is the callgrind output for the command
`rpmquery -qavv --nosignature --nodigest --nohdrchk`
on a recent Fedora with rpm-4.13 something which is rate limited by
headerImport.
HeaderImport is on the critical code path for every Header.
The top 3 "piggies" are (611,902,317 PROGRAM TOTALS)
138,740,167 * ???:msort_with_tmp.part.0'2 [/usr/lib64/libc-2.24.so]
This can be improved by not calling headerSort. Instead, do an insertion of
tags appended from the immutable region.
90,450,776 * ???:0x0000000000017410 [/usr/lib64/librpm.so.7.0.0]
This hotspot is from swabbing integer tag arrays on _EVERY_ headerImport().
Instead, do the swab only where needed on retrieval, in headerGet() (or equiv)
89,550,640 * ???:memcpy@GLIBC_2.2.5 [/usr/lib64/libc-2.24.so]
There is (at least) an extra copy from the buffer returned from Berkeley
DB. Instead, make a call to get the #bytes needed, malloc the buffer, and set
flags (DBT_USERMEM?) appropriately in a 2nd call to fill the buffer directly.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/174
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint