Android InputStream.read() horribly slow
问题 I'm working on an Android app that needs to communicate with a server (running on my PC) which is also written by me. The problem is that InputStream.read() takes an eternity, processing 200kb takes something around 30 seconds. Maybe the garbage collection is involved somehow, during my loop it gets called from time to time but the listed delays are only 2 or 3 millisecods and all in all maybe 20ms so I don't think that's the problem. My code: client = new Socket("192.168.1.1", 1235); client