DESCRIPTION

JCBC-421: Rewriting the Query internals for better performance.

This changeset is a complete rewrite of the Query object internals while
keeping the external API completely identical. Under the covers, it now
uses a String array instead of a HashMap to provide faster looping and
better cache friendliness.

Also, values are now encoded and quoted (if needed at all) during the set time
and not when the query string is created. This gives even better performance
when most of the Query objects are cached and just fields changed on the fly.

It also uses a custom compiled regex to identify JSON objects and does not rely
on the slower spymemcached "isJSONObject" anymore.

In JMH benchmark tests, performance was 100% better or more compared to the
old implementation. The performance difference is even higher when more params
are set on the Query object.

Change-Id: I73e9157093d5f0ea82b72d424548d1bc34afd5b5
Reviewed-on: http://review.couchbase.org/33930
Reviewed-by: Andreas Short xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2014-03-06 09:20:51.744000000

Change has been successfully cherry-picked as abf39bf460424afcc5993979bac41874975c7759

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