Currently go library's TDebugProtocol provides 2 features:
- debug logging
- duplicate write the protocol to another protocol (for size counting, etc.)
When someone only need the 2nd feature, they still need to pay the price of the 1st feature, even if they set TDebugProtocol.Logger to NopLogger, as we cannot avoid all the fmt.Sprintf calls, and those calls can waste significant cpu resource (in one of our services, the fmt.Sprintf calls from TDebugProtocol counts to 10% of cpu usage).
Provide a dedicated TDuplicateToProtocol, and deprecate TDebugProtocol.DuplicateTo, to help avoid this performance penalty.