Could you please help me to understand the difference between response times when i am using JSR223+Groovy (with caching) and BeanShell and what a reason of it:
The gray line is JSR223, red - BeanShell
Inside them a have a code which sending Protobuf message via HTTP protocol:
byte[] data = protobuf.toByteArray();
String SESSION = vars.get("SESSION");
String url = "http://" + vars.get("SERVER_NAME")+":8080/messages/list";
HttpClient client = new DefaultHttpClient();
////System.out.println(url);
HttpPost post = new HttpPost(url);
HttpEntity entity = new ByteArrayEntity(data);
post.setEntity(entity);
post.setHeader(HttpHeaders.CONTENT_TYPE, "application/x-protobuf");
post.setHeader(HttpHeaders.ACCEPT,"*/*");
post.setHeader(HttpHeaders.ACCEPT_ENCODING,"identity");
post.setHeader(HttpHeaders.CONNECTION,"Keep-Alive");
post.setHeader(HttpHeaders.USER_AGENT,"UnityPlayer/5.0.3p3 (http://unity3d.com) ");
post.setHeader("Cookie", "SESSION="+SESSION);
HttpResponse response=null;
try {
response = client.execute(post);
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
response.getEntity().writeTo(baos);
byte[] b = baos.toByteArray();