Can these two calls to `format` really not be merged? This first string is GC-allocated but thrown away almost immediately. If you really must keep them separate, consider `sformat` for the first one using a stack-allocated buffer, as it seems the length of the result is limited to a maximum of only a few characters.