maskit commented on PR #13072: URL: https://github.com/apache/trafficserver/pull/13072#issuecomment-4209901674
## JA4 performance impact
Per fingerprint call (typical ClientHello with ~15 ciphers, ~15
extensions):
| Allocation type | Before | After |
|---|---|---|
| Helper return strings (version, count, ALPN, hexify) | ~10 + 2×N
ciphers/extensions | 0 |
| Intermediate comma-separated string for hashing | 2 | 0 (streaming
SHA256) |
| Vector copies for sorting | 2 | 0 (sort in place) |
| ALPN string copy | 1 | 0 (string_view) |
| Result string | 1 | 0 (caller buffer) |
This eliminates 2–4 heap allocations and ~40 small-string
construct/destruct cycles
per TLS connection. The per-connection savings are in the low-microsecond
range —
modest compared to the TLS handshake itself, but meaningful in aggregate
at high
connection rates (reduced allocator pressure and better cache utilization).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
