square/okhttp — pull request #370 by lingmingyb (2013-12-20 09:01:30+00:00)
Title: remove getMtu

In my testbench under Android 4.1.1 and Android 4.2.2, the getMtu method cost nearly 20ms+ for every connection setup which can not be ignored.

Since the mtu is just used to decide the size of Buffered Stream, I think we can define it slightly roughly, I test several SPDY servers(Tengine & shrpx) the Dataframe is always set to 4k, so I think 4096 can be used for BufferedInputStream while 1024 should be enough for the BufferedOutputStream. In my test the change of the buffer size has almost no change to the performance but saved lots of time for the mtu detection.