[perf] reduce copies of log messages