Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-25680

[GSS](7.4.z) JANDEX-50 - AnnotationInstance hash collissions degrade indexing processing time

XMLWordPrintable

      The AnnotationInstance.equals() method considers two annotations that are basically the same as distinct if they don't have the same target. However, the AnnotationInstance.hashCode() method does not take the target into account at all, which leads to hash table collisions.

      This can lead to extra overhead and processing time in StrongInternPool.intern as it runs into increasing amounts of index loops repeating equal calls if there happen to be lots of similar methods (same method name, parmeters, annotations and return but in different classes):

         java.lang.Thread.State: RUNNABLE
      	at org.jboss.jandex.StrongInternPool.eq(StrongInternPool.java:139)
      	at org.jboss.jandex.StrongInternPool.intern(StrongInternPool.java:246)
      	at org.jboss.jandex.NameTable.intern(NameTable.java:109)
      	at org.jboss.jandex.ClassInfo.setMethods(ClassInfo.java:781)
      	at org.jboss.jandex.Indexer.index(Indexer.java:1992)
      

            lthon@redhat.com Ladislav Thon
            rhn-support-aogburn Aaron Ogburn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: