]> git.ipfire.org Git - thirdparty/systemd.git/commit
properties: Peek the variant value type once 43145/head
authorChris Down <chris@chrisdown.name>
Sat, 18 Jul 2026 22:18:27 +0000 (15:18 -0700)
committerChris Down <chris@chrisdown.name>
Fri, 31 Jul 2026 23:51:08 +0000 (16:51 -0700)
commit5293068fb313f1ca1ab440dd3e868202d12a161c
tree779435330498086d23f1931636a8d510b89d039d
parent91d2131e20ca304ee1d9dabf71b351d6b4cfcddc
properties: Peek the variant value type once

bus_message_print_all_properties() peeks the variant type, but then the
print callback and the default bus_print_property() each peek the value
type again, so there can be up to two redundant calls per property. Peek
it once up front and pass it through.

With this, in my tests `systemctl show` over 160 units decreases in
instructions retired from 1167.6M to 1155.7M, so about 1%.
src/login/loginctl.c
src/shared/bus-print-properties.c
src/shared/bus-print-properties.h
src/systemctl/systemctl-show.c
src/timedate/timedatectl.c