Correct. As I understand the history, the extra creation of temporary
objects was one reason that the original Swing developers did not make
more use of immutable objects - but that was in the days of the 1.1
VM, where object allocation and GC was a lot more expensive.

As for testing, I was under the impression that you had something you
had used to do optimisations, because you've mentioned reducing layout
time from 100ms to 4ms.

On Fri, Apr 10, 2009 at 17:47, Greg Brown <[email protected]> wrote:
>>If I understand Noel correctly, he's saying that since the objects are
>>immutable, we may be forced to instantiate new objects where we were
>>previously modifying the properties of existing objects.
>
> That makes sense. I don't think we are re-using instances of these classes in 
> too many places, so this is probably a minor issue at best.
>

Reply via email to