mirror of https://github.com/grpc/grpc-java.git
* core: cache Accept-Encoding headers This avoids rebuilding the raw bytes for each RPC. The decode path is not yet optimized to avoid pulling to much into a single commit. Decompressors may still use invalid names, but this is equivalent to previous behavior, as cleaing happens later in the caching. Also, internal accessors on DecompressorRegistry are now hidden. Before: Benchmark (extraEncodings) Mode Cnt Score Error Units DecompressorRegistryBenchmark.marshalOld 0 sample 928744 124.104 ± 11.159 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00 0 sample 84.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50 0 sample 94.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90 0 sample 107.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95 0 sample 114.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99 0 sample 202.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999 0 sample 4944.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999 0 sample 12178.008 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00 0 sample 2056192.000 ns/op DecompressorRegistryBenchmark.marshalOld 1 sample 1345050 150.123 ± 6.952 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00 1 sample 109.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50 1 sample 127.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90 1 sample 142.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95 1 sample 152.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99 1 sample 243.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999 1 sample 4640.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999 1 sample 11472.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00 1 sample 2101248.000 ns/op DecompressorRegistryBenchmark.marshalOld 2 sample 1130903 175.846 ± 1.392 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00 2 sample 131.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50 2 sample 148.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90 2 sample 164.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95 2 sample 174.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99 2 sample 311.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999 2 sample 6048.768 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999 2 sample 12349.107 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00 2 sample 112000.000 ns/op After: Benchmark (extraEncodings) Mode Cnt Score Error Units DecompressorRegistryBenchmark.marshalOld 0 sample 1095005 67.555 ± 5.529 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00 0 sample 42.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50 0 sample 52.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90 0 sample 69.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95 0 sample 84.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99 0 sample 133.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999 0 sample 3324.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999 0 sample 11056.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00 0 sample 1820672.000 ns/op DecompressorRegistryBenchmark.marshalOld 1 sample 1437034 78.089 ± 0.723 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00 1 sample 60.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50 1 sample 69.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90 1 sample 79.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95 1 sample 83.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99 1 sample 96.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999 1 sample 2728.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999 1 sample 11104.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00 1 sample 105344.000 ns/op DecompressorRegistryBenchmark.marshalOld 2 sample 1203782 95.213 ± 0.864 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.00 2 sample 68.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.50 2 sample 85.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.90 2 sample 98.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.95 2 sample 101.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.99 2 sample 119.000 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.999 2 sample 3209.736 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p0.9999 2 sample 11257.947 ns/op DecompressorRegistryBenchmark.marshalOld:marshalOld·p1.00 2 sample 63168.000 ns/op |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||