DESCRIPTION

JVMCBC-252: Reduce GC on KV ResponseStatus Matching

Motivation
----------
Looking innocent, the values() iterator on the enum actually produces
quite some GC since it always converts the enum into an array which
needs to be collected a little later.

Modifications
-------------
We only need a handful of codes 99% of the time, so the code is
optimized in if else/if clauses right at the top. If its something
different, we fall back into the loop.

Result
------
For the common cases, no GC created and its also quicker.

Change-Id: If435c06d5bce7a64701f023e3f21eba5fd78374b


COMMENTS

author: Natasha Sullivan
date: 2015-10-12 14:25:20.262000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2015-10-12 14:25:38.800000000

Patch Set 1: Verified+1

-------------------------------------
author: Cory Peck
date: 2015-10-12 14:27:50.049000000

Patch Set 1: Code-Review+2

(1 comment)

Line:26, src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueStatus.java -> How I should configure idea not to insert <p/>

-------------------------------------
author: Natasha Sullivan
date: 2015-10-12 14:40:04.055000000

Patch Set 1:

good point, I have no idea. my IJ doesn't do it? hmm

-------------------------------------
author: Gerrit Code Review
date: 2015-10-12 14:40:23.505000000

Change has been successfully cherry-picked as fdfa02770355627e060ea0a2c003830ec034b609

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