DESCRIPTION

JVMCBC-301: Avoid Class.getSimpleName() overhead on every request

Motivation
----------
It turns out that getSimpleName() on the class calls toString on it
which has garbage overhead.

Modifications
-------------
Since we have a limited number of possible operations that are performed,
it makes sense to cache the resulting string in a map (which doesn't need
to be sync) and avoid the toString() overhead. Since it is a small HashMap,
the get() lookup has a little bit of overhead, but it is small enough to
provide benefit over not creating the garbage on every request.

On a 5 minute run at 10k ops/s, this saves around 100MB of allocations.

Result
------
Less garbage created on the IO thread on every request.

Change-Id: I89dbac076017f75d983c81996109aef82cfd5c2d
Reviewed-on: http://review.couchbase.org/60851
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2016-03-03 13:36:08.949000000

Change has been successfully cherry-picked as 3cfd4d99fd0ac22c28b86c8fc0d204773b899f65

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