[
https://issues.apache.org/jira/browse/THRIFT-5539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuxuan Wang resolved THRIFT-5539.
---------------------------------
Fix Version/s: 0.17.0
Resolution: Fixed
> Performance penalty of using TDebugProtocol.DuplicateTo
> -------------------------------------------------------
>
> Key: THRIFT-5539
> URL: https://issues.apache.org/jira/browse/THRIFT-5539
> Project: Thrift
> Issue Type: Improvement
> Components: Go - Library
> Affects Versions: 0.16.0
> Reporter: Yuxuan Wang
> Assignee: Yuxuan Wang
> Priority: Major
> Fix For: 0.17.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)