Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-483

Use MethodHandles or Javassist Proxies instead of traditional reflection in 7.0 to reduce reflection performance cost

XMLWordPrintable

    • NEW
    • NEW

      See screenshot with a CH profile for VRP 10k usa with incremental java score calculation.
      40% of the time goes to Method.invoke! (note in the real world this is far less because this is really the worst case scenario)
      Most time should be going to the score calculator (= so deep submove scoped), not reading the planning variable from a getter for move scoped code (even if it's with reflection).

      As of JDK 7 we have MethodHandle's, which are suppose to give us better performance (if used properly, with generics I presume). I played with them before, to use them in BeanPropertyMemberAccessor a few years ago and I didn't notice a big gain then on JDK 7. Having a mimimum java 6 requirement version killed the initiative at the time.

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: