Hi Jeff, On Wed, 11 Oct 2023 at 23:27, Jeff King <peff@xxxxxxxx> wrote: > I think this is a reasonable thing to have. Thanks for taking a look > Generating the json output isn't entirely trivial (and certainly > involves allocations), but we throw it away unused if tracing isn't > enabled. Maybe we'd want something like: > > if (!trace2_is_enabled()) > return; > > at the top of the function? It looks like other callers of > jw_object_begin() have a similar issue, and this is probably premature > optimization to some degree. It just feels like it should be easy for > tracing to be zero-cost (beyond a single conditional) when it's > disabled. This definitely makes sense to me. Will add to a v2. Thanks, Rob :)