]> git.ipfire.org Git - thirdparty/systemd.git/commit
properties: Peek the variant value type once (#43145) main
authorChris Down <chris@chrisdown.name>
Sat, 1 Aug 2026 01:16:56 +0000 (18:16 -0700)
committerGitHub <noreply@github.com>
Sat, 1 Aug 2026 01:16:56 +0000 (18:16 -0700)
commit6a863b4dc31adc49fdfdd5deba32ed1b115adda3
tree779435330498086d23f1931636a8d510b89d039d
parent91d2131e20ca304ee1d9dabf71b351d6b4cfcddc
parent5293068fb313f1ca1ab440dd3e868202d12a161c
properties: Peek the variant value type once (#43145)

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%.