aslamplr / gh-cli

🖥 Yet another unofficial GitHub CLI! Minimalistic, opinionated, and unofficial by default.
https://github.com/aslamplr/gh-cli#gh-cli
MIT License
8 stars 1 forks source link

Switch to Rustls #108

Closed aslamplr closed 4 years ago

aslamplr commented 4 years ago

Closes #107

aslamplr commented 4 years ago

Performance is poorer compared to the OpenSSL build. image

Here the target/release/gh-cli is built with rustls and gh-cli is built with openssl.

aslamplr commented 4 years ago

hyper-rustls uses rustls-native-certs by default which use the platform's native certificate store when operating as a TLS client and which means additional lookups per connection. Selected to use webpki-tokio feature which uses webpki-roots for certificate store lookup which is compiled in statically means performance gains.

image Here the target/release/gh-cli is built with rustls and gh-cli is built with OpenSSL.

The performance regression is gone with this change and we are gaining 1x performance compared to one with OpenSSL client. More performance benchmarks are required to confirm this.