AnnotationMapper.processAnnotations is really hot performance-wise in multi-threaded applications (see https://issues.jenkins-ci.org/browse/JENKINS-13154 for more details.)
This is because every time anything happens, the processAnnotations method is called and it needs to obtain a lock on annotatedTypes. Simply making the annotatedTypes field concurrency-safe doesn't work, because the processTypes methods adds a class to annotatedTypes before it processes its fields.
In this patch, we introduce another field that keeps track of classes that were already analyzed. This class is concurrency-safe, resulting in a substantial boost in multi-threaded applications.