Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Executor.execute() is very slow(Connection establishment and socket reading taking long time)
Executor.execute() is very slow [message #1803083] Fri, 22 February 2019 06:26
Santhosh Nullipady is currently offline Santhosh NullipadyFriend
Messages: 1
Registered: February 2019
Junior Member
Hi - In our project we are using Apache http client and fluent jar to the hit AWS cloud endpoint where in we pass request and get the response back. Code snippet is given below. But the performance is very slow. Connection establishing and socket read takes more time. Can you please suggest if there is any way to optimize this?

Executor executor = Executor.newInstance(httpClient);
//Executor executor = Executor.newInstance(buildHttpClient());
Response channelResponse = null;

Request httpRequest = Request.Post(serviceEndpointUrl)
.addHeader("Service", wizConnectRequest.getTransCode())
.addHeader("consumer", channel).addHeader("Async", String.valueOf(wizConnectRequest.isAsync()))
.addHeader("TimeOutPeriod", Integer.toString(wizConnectRequest.getTimeOutPeriod()));

channelResponse = executor.execute(httpRequest.useExpectContinue()
.connectTimeout(endPointTimeout) //in milliseconds TODO is it not managed through the Spring???
.bodyString(request, ContentType.DEFAULT_TEXT));

I have attached the performance snapshot using Dynatrace tool where the total time taken is 589.62. Please let me know.
Previous Topic:What is the Eclipse way to modify the workbench by switching perspectives or changing a perspective?
Next Topic:Beginner trying to open first "Assignment"
Goto Forum:

Current Time: Sun Jul 21 20:58:15 GMT 2019

Powered by FUDForum. Page generated in 0.02389 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top