Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-54

Light performance enhancements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1
    • 2.0
    • None

    Description

      The ClassMap.MethodCache uses String as key to methods; these keys are forged by concatenating the name of the method & the argument classes names (converted to their object equivalent for primitive types). Replacing the key scheme & using a dedicated class to implement the keys yields some performance improvement. (aka 3x faster to get from a map).

      The MethodMap uses an HashTable; by synchronizing MethodMap.

      {add,get}

      and synchronizing ClassMap.

      {get,put}

      on its MethodMap instance, it is possible to use a basic HashMap instead.

      There are various places where a StringBuffer is used when a StringBuilder will suffice.

      As a side note, there are a few places where the code readability can be improved by using strongly typed collections.

      As a small "missing" feature, exposing access to the Introspector from the Uberspector (Introspector getIntrospector()) allows to re-use JEXL for some lower level introspection needs.

      Attachments

        1. JEXL-54.patch
          30 kB
          Henri Biestro

        Activity

          People

            Unassigned Unassigned
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: