DESCRIPTION

JVMCBC-128: Avoid observeOn on the hot code path.

Motivation
----------
Using observeOn for every request adds significant latency and GC,
since lots of stuff is done in the background. In order to reduce
latency on the hot code path, the observeOn should be removed.

Modifications
-------------
Since we still need to move off the subscriber to a different
pool, a worker is utilized to complete the subject right from
this pool without going through the observeOn slowness.

Another optimization has been put into place so that non-retry
responses are completed from the IO thread, without the need
to even go through the response handler too. Note that for
safety reasons inside the response handler the same scheduling
mechanisms have been put into place.

Result
------
Faster execution on the hot code path. on a single-threaded
get loop this gives us a boost of 1k ops/s and less GC.

Change-Id: I712c45a8bb0b69efa75f02baaeeb244b5ab7c15b


COMMENTS

author: Natasha Sullivan
date: 2015-01-16 20:08:07.761000000

Uploaded patch set 1.

-------------------------------------
