Please format your code using </>
icon as explained in this guide. It will make your post more readable.
Or use markdown style like:
```
CODE
```
I'm editing your code...
How do you know it's "slow"?
Can you add a trace before and after this line and print current time:
Response response = restClient.performRequest("GET", "/hist_latest_5.5.0/_search",Collections.<String, String>emptyMap(),
entity);