Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 17576 invoked from network); 8 May 2009 02:16:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 May 2009 02:16:08 -0000 Received: (qmail 64565 invoked by uid 500); 8 May 2009 02:16:08 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 64434 invoked by uid 500); 8 May 2009 02:16:07 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 64424 invoked by uid 99); 8 May 2009 02:16:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2009 02:16:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2009 02:16:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8BC75234C041 for ; Thu, 7 May 2009 19:15:45 -0700 (PDT) Message-ID: <1033310266.1241748945557.JavaMail.jira@brutus> Date: Thu, 7 May 2009 19:15:45 -0700 (PDT) From: "James Carman (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (JEXL-54) Light performance enhancements In-Reply-To: <1060105730.1241695770302.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.