On Jul 23, 2012, at 2:27 AM, Aleksey Shipilev wrote:

> Global synchronization is the performance smell, and this looks to be
> potential scalability bottleneck (it sends shivers down my spine every
> time I see "static synchronized" in the same line. That is not to
> mention synchronizing on placeholder looks suspicious and error-prone.

I believe the code is correct.  The purpose is to load as many distinct 
"species" of BMH tuples as the application type schema requires.  The use of 
placeholders is patterned after the JVM's internal class loading algorithm.

The code does not need to be scalable, because the number of entries in the 
cache is small (order of 10-100) and scales only with type schema complexity, 
not workload complexity.

So in this case, "static synchronized" is the correct choice.

> Do you need help rewriting this with CHM?

No, but thanks for the help!

— John
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to