简体   繁体   中英

Android App slow connection to server

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?

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

Thanks Nik

如果您确实需要快速连接,则可以查看SPY http://en.wikipedia.org/wiki/SPDY OkHTTP已在Android http://square.github.io/okhttp/上支持它

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM