utils: Optimize default status message constructor by dichlofos · Pull Request #8489 · osquery/osquery
The proposed change looks good to me. Out of curiosity, do you have a rough idea or example of how much this time this optimization saves?
I recall numbers like 0.5% in perf table for strlen calls, and they often calculated "OK" length as I can see in registers, that's why I dig a bit there. And with help of std::string' SSO entire message construction will turn into 2-3 register-mem mov-s under -O2 opt.
I guess there exist much more interesting opts, but they require more thorough osq codebase learning :)