This is not meant to be an answer. Just want to share the result of a quick manual test with two implementations:
- NIO with ION (1.1.5) by Koushik Dutta
- OIO with OkHttp (1.1.1) by guys in Square
The test is done on the same device (Android 4.0.4) with LTE. Within 8 mins, 108 requests are made one by one (with no concurrency). The requests break down in 5 parts: NIO -> OIO -> NIO -> OIO -> NIO . The request is a HTTP PUT request to UserGrid API that return the same response that is turned to a String and processed in the same way.
In milliseconds:
NIO/ION 60 times OIO/OkHttp for 48 times
Min. : 889 Min. : 629.0
1st Qu.: 1086 1st Qu.: 774.5
Median : 1426 Median : 1241.0
Mean : 1659 Mean : 1712.2
3rd Qu.: 1697 3rd Qu.: 1881.2
Max. :10913 Max. :16333.0
Std Dev: 1329.406 Std Dev: 2254.099
Remarks:
- The app is restarted between each part. So the NIO/ION test has one more "first run" that is slightly slower. It shouldn't make a big difference to the average/mean, however.
From this test, you can say NIO is more predictable in response time.
As I said, this is not meant to be answer. I'm interested to see other test result and figure out in which scenario NIO/OIO is better. thx