-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[finagle-core] Eliminate unnecessary calls in the filter chain
Problem For extra safety we wrap the next service in the chain with Service.rescue, even though in the majority of cases it's an adapter between Service and Filter interfaces. Solution Eliminate this extra call. Before ``` Benchmark (numAndThens) Mode Cnt Score Error Units FilterBenchmark.andThenFilter 20 avgt 10 55.079 ± 0.294 ns/op FilterBenchmark.andThenFilter 50 avgt 10 163.251 ± 0.903 ns/op ``` After ``` Benchmark (numAndThens) Mode Cnt Score Error Units FilterBenchmark.andThenFilter 20 avgt 10 29.767 ± 0.206 ns/op FilterBenchmark.andThenFilter 50 avgt 10 86.184 ± 0.588 ns/op ``` Differential Revision: https://phabricator.twitter.biz/D1120263
- Loading branch information
Showing
2 changed files
with
43 additions
and
18 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