# Java mget is much slower than http mget when in high concurrency environment

**URL:** <https://discuss.elastic.co/t/java-mget-is-much-slower-than-http-mget-when-in-high-concurrency-environment/40127>\
**Category:** Elasticsearch\
**Created:** [January 26, 2016, 2:31pm UTC](https://discuss.elastic.co/t/java-mget-is-much-slower-than-http-mget-when-in-high-concurrency-environment/40127 "2016-01-26T14:31:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wang\_zhong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wang_zhong/32/7379_2.png) [@wang\_zhong](https://discuss.elastic.co/u/wang_zhong)\
**Post date:** [January 26, 2016, 2:31pm UTC](https://discuss.elastic.co/t/java-mget-is-much-slower-than-http-mget-when-in-high-concurrency-environment/40127/1 "2016-01-26T14:31:03Z")

</div>

Hi, when i test the performance of mget method with HP Loadrunning, i found that java's mget method is much slower than http's mget method, java's mget method is almost 5 times slower than http's mget method.

here is my test method.

`MultiGetResponse multiGetResponse = client.prepareMultiGet() .add(index, type, ids) .execute() .actionGet();`

curl -XGET '[http://127.0.0.1:9200/test/test/\_mget](http://127.0.0.1:9200/test/test/_mget)' -d '{  
"ids" : ["1", "2", "3", ...]  
}'

But the weird thing is that i send a single request respectively, their average time spent is the same.

you can also see the issue in here.

> <https://github.com/elastic/elasticsearch/issues/16233>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:21pm UTC](https://discuss.elastic.co/t/java-mget-is-much-slower-than-http-mget-when-in-high-concurrency-environment/40127/2 "2017-07-05T23:21:25Z")

</div>


