Files
servo/components/net
Jonathan Schwender 97c08a6f95 net: Optimize initial TLS connection (#44242)
By touching the crypto provider, we can force it to gather entropy.
On my linux VM, that moved ~60ms off the critical path (using aws-lc-rs,
but probably any other crypto provider would show similar behavior).
On my Linux workstation it was around ~30ms.

On Linux caching the rustls platform verifier cache optimizes another
50ms. On other platforms this will be cheaper, since
only on some systems all certificates are read. It might make sense to
explore
caching the whole tlsconfig (for websockets), since it looks like we are
just cloning
the same components and then constructing a new tlsconfig, which would
lead to
the same effective component. But that needs more investigation.


Testing: Doesn't change any visible behavior, covered by existing tests.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2026-04-22 07:39:59 +00:00
..
2025-09-10 14:58:45 +00:00