> > Does anyone know of a good way to solve this problem?  Any suggestions
> > around the issue of object creation performance are welcome.
> 
> One way to handle this problem would be to create an Object pool.
> There was an article on javaworld (www.javaworld.com) a few months
> back.  Basically, instead of creating new objects you request them from the
> pool.  When they are not needed anymore, you put them back in the pool.  This

Object pooling is great for cases where similar objects are created and
deleted multiple times, but in my case I simply need to create a large
number of similar objects (very few of which will get deleted during the
lifetime of the application).  In this case object pooling is not at all
appropriate. 

What I'm looking for is a way to somehow 'merge' the multiple object
creations into single large memory allocations (ie. cause the JVM to issue
fewer, larger malloc's).  This would definitely improve performance
dramatically. Simple in C, simple in C++, but I've no idea how to do this
in Java.

Cheers, Craig

------
"There's no honorable way to kill, no gentle way to destroy.  There is
 nothing good in war.  Except its ending."
                -- Abraham Lincoln, "The Savage Curtain", stardate 5906.5

======================================================================
Craig Taverner               ------======       Email:[EMAIL PROTECTED]
ComOpt AB                   ------========        Tel:   +46-42-212580
Michael Löfmans Gata 6     ------==========       Fax:   +46-42-210585
SE-254 38 Helsingborg       ------========       Cell:  +46-708-212598
Sweden                       ------======        http://www.comopt.com
======================================================================

Reply via email to