"Public service announcement: Object pooling is now a serious
performance loss for all but the most heavyweight of objects, and even
then it is tricky to get right without introducing concurrency bottlenecks."
http://www.ibm.com/developerworks/java/library/j-jtp09275.html?ca=dgr-jw22JavaUrbanLegends
-Adrian
On 6/9/2010 11:19 AM, Adam Heath wrote:
Why does EntityCondition create objects from a factory? This means
that any condition that needs to be created will end up storing the
object into the global heap, with all the requisite locks and
contention that occur from that. If a new object was just created,
however, java1.6 has the ability to allocate it on the stack, when
then means freeing said object is much more efficient.
I'm suggesting that the global factories for conditions be removed,
but the actual factory methods themselves should remain.