Chromium Code Reviews
DescriptionMove oknet's read operations to a background thread
The read operation on OkHttp's ResponseBody object is blocking. The thread on
which we perform the read is highly contended during initial load. This CL
moves the read operation to a background thread, improving startup time for
StocksApp by 1s on a Nexus 5. Ideally we would perform an asynchronous read on
the stream, but that is not currently possible in OkHttp according to
http://stackoverflow.com/questions/29222231/reading-okhttp-responsebody-data-asynchronously
R=ojan@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/46ced9ba693dd4f56d1d44e13e60ea3d66f9f792
Patch Set 1 #Patch Set 2 : less try-catch #Patch Set 3 : less try catch #Messages
Total messages: 3 (0 generated)
|