Hi Mark,

Am Montag, den 06.02.2006, 14:21 +0100 schrieb Mark Wielaard:
> Hi Roman,
> 
> On Mon, 2006-02-06 at 12:09 +0100, Roman Kennke wrote:
> > I guess the
> > java.beans.PropertyChangeSupport is now made more efficient (and not
> > thread safe) so that the SwingPropertyChangeSupport is not needed
> > anymore. Should we follow this?
> 
> Sure. It will clean up some of our code especially if we also move some
> if the JComponent property change methods up into the awt Component
> class so they share the same change support mechanism.

I am working on this ATM. The SwingPropertyChangeSupport and JComponent
have been adjusted already, now comes the java.awt.Component additions.

>  I do think you
> have to be careful to keep beans PropertyChangeSupport thread-safe
> though.

Indeed. It seems that Sun has considered the memory issue (duplicating
the changeSupport instances in JComponent and Component as well as their
internal datastructures) worse than the little performance gain from the
unsynchronized SwingPropertyChangeSupport, which is also what I feel.

>  But maybe it can be made a little more efficient by not using
> the old Vector and Hashtable classes all the time which seem to double
> the synchronization in that class, but use an List and Map for that and
> only synchronize on those when really needed.

Agreed.

Cheers, Roman

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to