commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JEXL-54) Light performance enhancements
Date Fri, 08 May 2009 02:15:45 GMT

    [ https://issues.apache.org/jira/browse/JEXL-54?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707208#action_12707208
] 

James Carman commented on JEXL-54:
----------------------------------

Could JEXL benefit from JDK5+ features (most notably generics and varargs)?  If so, perhaps
it's time to look at modernizing it?  Is there much work going on with JEXL?

> Light performance enhancements
> ------------------------------
>
>                 Key: JEXL-54
>                 URL: https://issues.apache.org/jira/browse/JEXL-54
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Henri Biestro
>             Fix For: 2.0
>
>         Attachments: JEXL-54.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message