Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.Builder().build() takes 500ms #2032

Open
den-crane opened this issue Dec 17, 2024 · 0 comments
Open

Client.Builder().build() takes 500ms #2032

den-crane opened this issue Dec 17, 2024 · 0 comments

Comments

@den-crane
Copy link
Collaborator

den-crane commented Dec 17, 2024

Describe your feedback

Code example

        long startTime = System.nanoTime();

        final Client client = new Client.Builder()
                .setUsername("default")
                .setPassword("")
                .addEndpoint("http://127.0.0.1:9999/")       // any port / any address, it does nothing for  .build()
                .build();

        long stopTime = System.nanoTime();
        System.out.println((stopTime - startTime) / 1000_000_000.0);
0.559635834

it seems it's because of createSSLContext, but I don't even need SSL, because I use http.

    public CloseableHttpClient createHttpClient() {
          SSLContext sslContext = this.createSSLContext();

In case of .useNewImplementation(false) -- 170 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants