Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 95448 invoked from network); 12 Mar 2011 10:24:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Mar 2011 10:24:29 -0000 Received: (qmail 18475 invoked by uid 500); 12 Mar 2011 10:24:29 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 18304 invoked by uid 500); 12 Mar 2011 10:24:28 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 18296 invoked by uid 99); 12 Mar 2011 10:24:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2011 10:24:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2011 10:24:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D703139DEEA for ; Sat, 12 Mar 2011 10:23:59 +0000 (UTC) Date: Sat, 12 Mar 2011 10:23:59 +0000 (UTC) From: "Andreas Veithen (JIRA)" To: java-dev@axis.apache.org Message-ID: <317413630.15335.1299925439877.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (AXIS2-4524) Caching BeanInfo in adb module's BeanUtil improves performance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-4524?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1300= 6022#comment-13006022 ]=20 Andreas Veithen commented on AXIS2-4524: ---------------------------------------- A WeakHashMap won't work here. The reason is explained in the Javadoc of We= akHashMap: "care should be taken to ensure that value objects do not strong= ly refer to their own keys, either directly or indirectly, since that will = prevent the keys from being discarded." This will be the case here. On the = other hand, if one tries to avoid this value->key strong reference (by usin= g WeakReference somewhere), then the entries in the cache will be removed d= uring every run of the garbage collector. As noted above, if there was a simple solution to this problem, then Sun wo= uld have implemented BeanInfo caching already in the JRE. > Caching BeanInfo in adb module's BeanUtil improves performance > -------------------------------------------------------------- > > Key: AXIS2-4524 > URL: https://issues.apache.org/jira/browse/AXIS2-4524 > Project: Axis2 > Issue Type: Improvement > Components: adb > Affects Versions: 1.5 > Reporter: Valgeir Halld=C3=B3rsson > Attachments: BeanUtil.diff, axis2.diff > > > I've detected that org.apache.axis2.databinding.utils.BeanUtil class can = be improved for performance. It seems that invoking Introspector.getBeanInf= o(Class, Class) takes a lot of time. By caching java.beans.BeanInfo in thi= s class it doubles up (at least) the performance, especially when returning= a big dataset. I changed this myself and saw a great deal of performance i= mprovement.=20 -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org