]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
properties: Peek the variant value type once (#43145)
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)
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%.


Trivial merge