commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Rosenberg (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OGNL-253) Every getter/setter method lookup that misses does a second lookup
Date Wed, 16 Dec 2015 16:52:46 GMT
Jasper Rosenberg created OGNL-253:
-------------------------------------

             Summary: Every getter/setter method lookup that misses does a second lookup
                 Key: OGNL-253
                 URL: https://issues.apache.org/jira/browse/OGNL-253
             Project: Commons OGNL
          Issue Type: Improvement
          Components: Core Runtime
    Affects Versions: 3.0.13, 3.1.2
            Reporter: Jasper Rosenberg
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message