1

We are working now on our Android App and we are actually not happy with the connection to the server and the response time at all. Our server has an Apache 2.2 and the response over an browser took 0,3 sec. The service is well optimized for speed and performance.

The problem we had now is the standart HTTP connection client from Java on Android. It took 4 seconds to establish the connection to the server and after that some ms to download the results. After there we have the parsing time and the display time. The whole time is somehow 5-6 seconds, what is impossible for an performance App like ours.

We replaced the standart HTTP connection client with an own socket connection client and we had an amazing impact. The connection time and the download time is now < 100 ms. But we have now the problem, that Volley (the library from Google) needs 4 seconds to convert the stream in a byte array.

Does anyone has an idea what we can do to improve this convertion?

P.S. are there some special settings for Apache to make the connection from an App faster?

Thanks Nik

Mutatos
  • 1,675
  • 4
  • 25
  • 55
  • 4 seconds to establish the connection sounds really slow, that's not normal. could you show the code? same goes for the 4 seconds to convert the stream (although I don't know how much data you're receiving). check this: http://stackoverflow.com/a/1264737/1096567 – Lovis Dec 12 '13 at 11:34
  • Was the browser test on the same Android device with the same internet connection? Are you using WiFi or 3G? Do other requests have a slow reaction time or is it just your request? – Itai Hanski Dec 12 '13 at 11:48
  • It is in both cases Wifi – Mutatos Dec 12 '13 at 12:02

1 Answers1

0

If you really need fast connection you could take a look at SPY http://en.wikipedia.org/wiki/SPDY OkHTTP is already supporting that on Android http://square.github.io/okhttp/

Pasquale Anatriello
  • 2,355
  • 1
  • 16
  • 16
  • We have enabled SPDY, thanks for the suggestion. We test now the suggested OkHTTP. I will write you if there is some good result coming. – Mutatos Dec 12 '13 at 14:04
  • Well we have tested OkHTTP with SSL and without. We have the same delay. Is there something else we can try? Especially when we sniff the request to the server we become: duplicated ack and TCP Retransmission ...!?! – Mutatos Dec 13 '13 at 16:21