Uploaded image for project: 'BVal'
  1. BVal
  2. BVAL-113

Minor performance improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.4, 0.5
    • 1.0
    • jsr303
    • None

    Description

      We found a couple of minor performance issues that came up during our profiling:

      1) AnnotationProcessor.java, FeaturesCapable.java, and MetaBean.java use ArrayUtils.add() to grow the array. The issue is that ArrayUtils.add() uses reflection to grown the array which 1) is slower then just instantiating the array, and 2) is completely unnecessary in these cases as the type of the array is always well known and doesn't change.

      2) MetaBean.java stores MetaProperty objects in a sorted array and uses binary search to lookup and insert them. An implementation that stores these objects in a map would offer faster lookup and insert performance.

      Attachments

        1. BVAL-113.patch
          7 kB
          Jarek Gawor
        2. PerfTest.java
          2 kB
          Jarek Gawor

        Activity

          People

            Unassigned Unassigned
            gawor@mcs.anl.gov Jarek Gawor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: