Re: bottleneck by java.lang.Class.getAnnotations()

2012-11-02 Thread Alexander Knöller
I know. But there is a usual solution to those kind of problems: double checked locking. This would avoid synchronization for all the cases where no redefinitions take place. (I also put in a bug-report for the sunjdk where I elaborated this a bit more.) I am not so familiar with concurrency whil

Re: bottleneck by java.lang.Class.getAnnotations()

2012-11-01 Thread Joe Darcy
On 11/1/2012 7:11 AM, Alan Bateman wrote: On 01/11/2012 13:17, Alexander Knöller wrote: Hi there. java.lang.Class.getAnnotations() always enters a synchronized-block, slowing down multi core machines that heavily make use of Annotations. (in our Case we use LoadTimeWeaving in the spring-fram

Re: bottleneck by java.lang.Class.getAnnotations()

2012-11-01 Thread Alan Bateman
On 01/11/2012 13:17, Alexander Knöller wrote: Hi there. java.lang.Class.getAnnotations() always enters a synchronized-block, slowing down multi core machines that heavily make use of Annotations. (in our Case we use LoadTimeWeaving in the spring-framework 3.1.2) We are using sun-jdk 6 which has