DESCRIPTION

JCBC-937: Size hint for JsonObject and JsonArray

Motivation
----------
If we know how large the final JsonObject or JsonArray will be,
it makes sense to initialize the internal Map or List already
with the target size to avoid excessive resizing.

Modifications
-------------
Add new private constructors with explicit size hint and apply
it if possible in both the array and the object.

Result
------
Less resizing needed of the internal map if the size can be
estimated upfront.

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


COMMENTS

author: Tate Garrett
date: 2016-03-16 13:51:25.217000000

Change has been successfully cherry-picked as 85a55e274b12854c6fa8badf65ad51b1bf598764

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