Android HttpClient perfomance?

It is all very simple. HttpClient per default allows only two concurrent connections to the same target host as required by the HTTP specification. So, effectively your worker threads spend most of their execution time blocked waiting for those two connections to become available You should increase the 'max connections per route' limit to reduce / eliminate worker thread contention You might also want to check out the benchmark used by Apache HttpComponents project to measure performance of HttpClient wiki.apache.org/HttpComponents/HttpClien....

It is all very simple. HttpClient per default allows only two concurrent connections to the same target host as required by the HTTP specification. So, effectively your worker threads spend most of their execution time blocked waiting for those two connections to become available.

You should increase the 'max connections per route' limit to reduce / eliminate worker thread contention. You might also want to check out the benchmark used by Apache HttpComponents project to measure performance of HttpClient. wiki.apache.org/HttpComponents/HttpClien....

This seems like what I need, thanks! – Ilya Izhovkin Jan 20 at 10:08.

I suspect the context switching is resulting in poor performance with the thread safe manager, and you should stop using it. I suppose you could compare the Apache client with the default Java client, but I don't think you are going to get much of a performance gain. Personally, I've found the DOM XML parser to be a bit slow, so if you are using XML reformatiing it may help.

Depending on your app you may be able to request items before you need them or use caching to create a better user expierence, but we would need to know more to give you meaningful advice.

But when I create new HttpClient instance for every request connection can not be reused. Despite of this, such version runs faster, reasons of it is unclear for me.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions