Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-253

Every getter/setter method lookup that misses does a second lookup

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.13, 3.1.2
    • None
    • Core Runtime
    • None

    Description

      Regarding https://github.com/jkuhnert/ognl/pull/12

      In getSetMethod/getGetMethod it calls contains after getting a null method back. This means that anytime we ever have a property miss for a class we are going to do two lookups in the cache (the get and contains). This isn't great because property misses can happen a lot.

      The solution is actually trivial. The ClassPropertyMethodCache is already storing a special value for null internally. It should just return it, and the two callers can check for the special value and return null rather than making the containsKey extra call.

      Attachments

        Activity

          People

            Unassigned Unassigned
            perfnorm Jasper Rosenberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: