Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finagle-core: Call Trace.isActivelyTracing less
# Problem We call `isActivelyTracing` too often to prevent unnecessarily structures from materializing (a very simple proxy reports 12 calls/request). The overhead of `isActivelyTracing` (about 5% of CPU profile) may outweigh the benefits of saving allocations. Additionally, a canonical usage pattern requires users to guard tracing operations behind the `isActivelyTracing` result, which pretty much doubles the number of checks we do today. # Solution Do not check `isActivelyTracing` internally before materializing annotations and rely on callers checking that externally. This cuts the number of `isActivelyTracing` calls in a proxy in half: from 12 to 7. JIRA Issues: CSL-5625 Differential Revision: https://phabricator.twitter.biz/D193300
- Loading branch information
1 parent
b1ca8f8
commit 33841d2
Showing
3 changed files
with
8 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters