"Compiled" static header maps instead of big trie #33932
Mobile/CC (success)
Check has finished
Details
Check run finished (success ✔️)
The check run can be viewed here:
Mobile/CC (pr/33932/main@56c5e4e)
Check started by
Request (pr/33932/main@56c5e4e)
@ravenblackx 56c5e4e
#33932 merge
main@e1c31c3
"Compiled" static header maps instead of big trie
Commit Message: "Compiled" static header maps instead of big trie
Additional Description: This is slightly slower for "misses" but significantly faster for "hits". Given that the majority of headers are expected to be matches for the static table, this should be a big win. (Each faster hit pays for 30 slower misses!) This structure also uses significantly less memory than the big trie.Performance benchmarks -
bazel run -c opt test/common/http:header_map_impl_speed_test -- --benchmark_filter="bm*" --benchmark_repetitions=25 --benchmark_display_aggregates_only
Benchmark before after beforeStdDev afterStdDev change bmHeaderMapImplRequestStaticLookupHits 47.2ns 16.4ns 0.629 0.378 -65.3% bmHeaderMapImplResponseStaticLookupHits 34.7ns 14.3ns 0.571 0.085 -58.8% bmHeaderMapImplRequestStaticLookupMisses 6.89ns 6.83ns 0.044 0.034 -0.01% bmHeaderMapImplResponseStaticLookupMisses 6.40ns 7.31ns 0.028 0.057 +14.2% Risk Level: Could be high since headers are parsed millions of times per second. But also there's a lot of existing test cases.
Testing: Added tests, existing tests involving headers will also provide coverage.
Docs Changes: n/a
Release Notes: Not yet
Platform Specific Features: n/a
Environment
Request variables
Key | Value |
---|---|
ref | fb5a879 |
sha | 56c5e4e |
pr | 33932 |
base-sha | e1c31c3 |
actor | @ravenblackx |
message | "Compiled" static header maps instead of big trie... |
started | 1715962685.196405 |
target-branch | main |
trusted | false |
Build image
Container image/s (as used in this CI run)
Key | Value |
---|---|
default | envoyproxy/envoy-build-ubuntu:f94a38f62220a2b017878b790b6ea98a0f6c5f9c |
mobile | envoyproxy/envoy-build-ubuntu:mobile-f94a38f62220a2b017878b790b6ea98a0f6c5f9c |
Version
Envoy version (as used in this CI run)
Key | Value |
---|---|
major | 1 |
minor | 31 |
patch | 0 |
dev | true |