Copy-by-value in sdbus++ generated objects
Patrick Venture
venture at google.com
Sat Nov 3 03:32:50 AEDT 2018
Most repos inherit from an auto-generated object. Those objects pass
all parameters by value. This is fine for many cases where they would
need to create a copy of it, but in the case where:
for instance:
https://github.com/openbmc/sdbusplus/blob/master/tools/sdbusplus/templates/property.mako.prototype.hpp.in#L69
The values match it's wasteful to copy. It's also possible the cpp I
learned way back is different in how this behavior works, but I wanted
to check. Because of the prevalence of this code, if there are lots
of updates that don't actually change the value, it could optimize
quite a bit at run-time.
It would require a lot of simultaneous fixes (or two different objects
generated, and transitioning everything).
Thoughts?
Patrick
More information about the openbmc
mailing list