DESCRIPTION

JVMCBC-83: Use CopyOnWriteArraySet for less cpu usage.

Motivation
----------
When profiling the application on common workloads, it was discovered
that there were hot methods on the CHM iterator, traced back to the
RequestHandler's set of nodes.

Modifications
-------------
Using an optimized data structure for this workload (iterations vastly
outnumber the changes), using a CopyOnWriteArraySet instead of a backing
CHM, this CPU overhead is removed. The COWAS is also thread safe by
default, but it is using a simpler data structure undernath.

Result
------
Less CPU time spent when iterating the same data over and over.

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


COMMENTS

author: Natasha Sullivan
date: 2014-12-12 02:52:15.178000000

Change has been successfully cherry-picked as 5cda9067471e200475236fea5f5cb27f656a52eb

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