Size of arrays in UIComponentClassicTagBase.addChild and addFacet

From: Adam Winer <>
Date: Wed, 15 Aug 2007 15:52:31 -0700

Checking out some heap profiles, I noticed a profusion
of 136 byte object arrays coming from UIComponentClassicTagBase.
Seems that addChild() is defaulting the size of its
array to 32 elements. Anyone know why that number was chosen?

UIComponentBase is letting its ArrayList of children default
to 10, and even that probably overstates the average. But
the two numbers should match, IMO.

addFacet() is letting the facets ID list default in size,
which means 10 - I think it's a rare component that has > 2 facets
in use at any one time. UIComponentBase lets this map default
in size, which gives us the unnecessarily large size of 16.
OTOH, in practice, the vast majority of components have no
facets at all, so these objects aren't created - it's
the child list that is of concern.

-- Adam