IceSSL connection establishment speed: C# vs Java
On macos, ssl connection establishment in C# is a lot slower than Java:
% python3 allTests.py Ice/maxConnections --protocol ssl
*** [1/1] Running csharp/Ice/maxConnections tests ***
[ running client/server test - 10/10/24 16:32:03 ]
- Config: ssl
testing the creation of 100 connections... ok
testing the creation of 10 connections with connection lost at 11... ok
testing the creation of 10 connections with connection lost at 11 then recovery... ok
Ran 1 tests in 4.52 seconds
1 succeeded
% python3 allTests.py Ice/maxConnections --protocol ssl
*** [1/1] Running java/Ice/maxConnections tests ***
[ running client/server test - 10/10/24 16:34:34 ]
- Config: ssl
testing the creation of 100 connections... ok
testing the creation of 10 connections with connection lost at 11... ok
testing the creation of 10 connections with connection lost at 11 then recovery... ok
Ran 1 tests in 1.09 seconds
1 succeeded
It's actually just as slow in C++:
% python3 allTests.py Ice/maxConnections --protocol ssl
*** [1/1] Running cpp/Ice/maxConnections tests ***
[ running client/server test - 10/10/24 16:55:52 ]
- Config: ssl
testing the creation of 100 connections... ok
testing the creation of 10 connections with connection lost at 11... ok
testing the creation of 10 connections with connection lost at 11 then recovery... ok
Ran 1 tests in 4.59 second
Would be good to check if all mappings are picking the same TLS version, and cipher suite, otherwise the comparison is not fair.
preliminary testing shows that Java is using TLS 1.3 and C# is using TLS 1.2
I think the difference comes from TLS 1.3 vs TLS 1.2
Java supports TLS 1.3 on macOS
.NET does not support TLS 1.3 on macOS see: https://github.com/dotnet/runtime/issues/1979
Ice for C++ has the same issue, we use the old SSL APIs that no longer support using TLS 1.3