We are formatting all transactions to pass to the debug logger in the mempool. This results in a large number of allocations that are not necessary unless the debug/info logger is actually being used. We should find a way to stop that. One way might be to use the lazy version of the fmt.Sprintf, which shouldn't actually perform any formatting unless the logger is actually being used.
We are formatting all transactions to pass to the debug logger in the mempool. This results in a large number of allocations that are not necessary unless the debug/info logger is actually being used. We should find a way to stop that. One way might be to use the lazy version of the
fmt.Sprintf
, which shouldn't actually perform any formatting unless the logger is actually being used.https://github.com/celestiaorg/celestia-core/blob/931911418f760cf6a01e9fbde6aa9734249d0742/mempool/v1/reactor.go#L207-L209