Re: The effect of the property cache (or: playing around with a new toy)

2007-07-31 Thread Andreas L Delmelle
On Jul 30, 2007, at 04:26, Manuel Mall wrote: On Thursday 19 July 2007 07:28, Andreas L Delmelle wrote: On Jul 19, 2007, at 01:10, Andreas L Delmelle wrote: snip / BTW: the following is perfectly legitimate Object o = new Object(); Just wondering if anyone can think of a use-case...

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-29 Thread Manuel Mall
On Thursday 19 July 2007 07:28, Andreas L Delmelle wrote: On Jul 19, 2007, at 01:10, Andreas L Delmelle wrote: snip / BTW: the following is perfectly legitimate Object o = new Object(); Just wondering if anyone can think of a use-case... If you want a class internal object to synchronize

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-20 Thread Andreas L Delmelle
On Jul 18, 2007, at 22:17, Jeremias Maerki wrote: FWIW: going over those initial figures again, and Class Name | Objects |Shallow Heap |Retained Heap |Perm --

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-19 Thread Andreas L Delmelle
On Jul 19, 2007, at 01:10, Andreas L Delmelle wrote: snip / Number oneInt = new Integer(1); Number oneDouble = new Double(1.0); boolean check = (oneInt.hashCode() != oneDouble.hashCode()); = (check == true) Can this be relied upon? AFAICT, it can. Integer.hashCode() will simply return

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-18 Thread Andreas L Delmelle
On Jul 18, 2007, at 22:17, Jeremias Maerki wrote: So I wanted to play with this really great tool a little more and ran a big document which I knew would cause an OutOfMemoryError at 64MB heap size. Here's what came out: snip / Interesting figures! Did you have any chance to run a

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-18 Thread Jeremias Maerki
Some additional thoughts before going to bed: - I think the static synchronized WeakHashMap should be avoided. There's a lot of synchronization that is performed. I suspect this will have a bad effect on performance. It may make more sense to have a FlyWeightFactory (per object) per rendering

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-18 Thread Jeremias Maerki
On 18.07.2007 23:05:57 Andreas L Delmelle wrote: On Jul 18, 2007, at 22:17, Jeremias Maerki wrote: So I wanted to play with this really great tool a little more and ran a big document which I knew would cause an OutOfMemoryError at 64MB heap size. Here's what came out: snip /

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-18 Thread Andreas L Delmelle
On Jul 18, 2007, at 23:18, Jeremias Maerki wrote: Some additional thoughts before going to bed: - I think the static synchronized WeakHashMap should be avoided. There's a lot of synchronization that is performed. I suspect this will have a bad effect on performance. I have always assumed

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-18 Thread Andreas L Delmelle
On Jul 18, 2007, at 23:31, Jeremias Maerki wrote: snip / [Me:] All we really need to uniquely identify a NumberProperty is the number-member, I think... I dont' think that works, since Number doesn't implement hashCode (), for example. Right, but its concrete subclasses in the java.lang

Re: The effect of the property cache (or: playing around with a new toy)

2007-07-18 Thread Andreas L Delmelle
On Jul 19, 2007, at 01:10, Andreas L Delmelle wrote: snip / Hmm, made me wonder: Number oneInt = new Integer(1); Number oneDouble = new Double(1.0); boolean check = (oneInt.hashCode() != oneDouble.hashCode()); = (check == true) Can this be relied upon? BTW: the following is