Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6133

ReflectionUtils performance regression

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.20.0
    • 0.21.0
    • conf
    • None
    • Reviewed

    Description

      HADOOP-4187 introduced extra calls to Class.forName in ReflectionUtils.setConf. This caused a fairly large performance regression. Attached is a microbenchmark that shows the following timings (ms) for 100M constructions of new instances:

      Explicit construction (new Test): around ~1.6sec
      Using Test.class.newInstance: around ~2.6sec
      ReflectionUtils on 0.18.3: ~8.0sec
      ReflectionUtils on 0.20.0: ~200sec

      This illustrates the ~80x slowdown caused by HADOOP-4187.

      Attachments

        1. hadoop-6133-0.20.patch
          2 kB
          Todd Lipcon
        2. hadoop-6133-trunk.txt
          2 kB
          Todd Lipcon
        3. hadoop-6133-trunk.txt
          2 kB
          Todd Lipcon
        4. Test.java
          2 kB
          Todd Lipcon

        Issue Links

          Activity

            People

              tlipcon Todd Lipcon
              tlipcon Todd Lipcon
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: