mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
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>