Heads up, BDB coming, needed to support fast configuration

Chris Hegarty chris.hegarty at oracle.com
Fri May 11 10:11:55 PDT 2012


On 11/05/12 17:32, Mandy Chung wrote:
>....
> I'm fine with what you have.
>
> I asked this because I have a comment related to what Paul/Roger has
> raised about the synchronized getStringAndInt method. I believe you can
> move 'svala' and 'ivala' to the StringAndInt class as the instance
> fields to get rid of the synchronization. The getStringAndInt method can
> pass these fields of a newly created StringAndInt object to the get2
> method call and StringAndInt class may provide the accessor methods to
> get the key and value.

Right that would be cleaner, but I'm still reluctant to change until we 
have more experience with the usage of PersistentTreeMap.

The reason I being stubborn here (and it may be completely unfounded) is 
that I'm expecting each thread to have its own PersistentTreeMap 
instance, in which case the uncontented lock should be virtually 
optimized out, but the extra creation of these "holder" arrays may just 
cause a little more than necessary garbage.

That said, I could go either way on this. I see this as more of a 
performance optimization at some point in the future when we have the 
fast configuration in. Let me know if you want to change it.

-Chris.

>
> Mandy



More information about the jigsaw-dev mailing list