You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Dan Armstrong (JIRA)" <ji...@apache.org> on 2010/11/10 08:52:13 UTC

[jira] Created: (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped as go from 48 second to 8 second request

Simple BeanInfo cache in BeanUtil.java helped as go from 48 second to 8 second request
--------------------------------------------------------------------------------------

                 Key: AXIS2-4878
                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
             Project: Axis2
          Issue Type: Improvement
          Components: adb
    Affects Versions: 1.5.2
         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
            Reporter: Dan Armstrong


We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.

The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:

import java.util.concurrent.*;

    private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();

            // About line 140, where calls Introspector.getBeanInfo:
            BeanInfo beanInfo = beanInfoCache.get(beanClass);
            if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));


The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO to too slow (rhyme intended).

Please add this to the Axis2 to benefit others.


Thank you,

Dan Armstrong
AO Industries, Inc.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Leon Fleysher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037577#comment-13037577 ] 

Leon Fleysher commented on AXIS2-4878:
--------------------------------------

Please fix this bug -- it makes AXIS2 unusable for big XML files.

> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
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


[jira] Updated: (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped as go from 48 second to 8 second request

Posted by "Dan Armstrong (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Armstrong updated AXIS2-4878:
---------------------------------

    Description: 
We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.

The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:

import java.util.concurrent.*;

    private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();

            // About line 140, where calls Introspector.getBeanInfo:
            BeanInfo beanInfo = beanInfoCache.get(beanClass);
            if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));


The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).

Please add this to the Axis2 to benefit others.


Thank you,

Dan Armstrong
AO Industries, Inc.

  was:
We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.

The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:

import java.util.concurrent.*;

    private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();

            // About line 140, where calls Introspector.getBeanInfo:
            BeanInfo beanInfo = beanInfoCache.get(beanClass);
            if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));


The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO to too slow (rhyme intended).

Please add this to the Axis2 to benefit others.


Thank you,

Dan Armstrong
AO Industries, Inc.


> Simple BeanInfo cache in BeanUtil.java helped as go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "kirti teja (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093573#comment-13093573 ] 

kirti teja commented on AXIS2-4878:
-----------------------------------

Showstopper!  very poor performance - please fix this as soon as possible.

> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
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


[jira] [Commented] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098902#comment-13098902 ] 

Hudson commented on AXIS2-4878:
-------------------------------

Integrated in Axis2 #978 (See [https://builds.apache.org/job/Axis2/978/])
    AXIS2-4524 / AXIS2-4878 / AXIS2-5118 / AXIS2-5119: Initial implementation of a BeanInfo cache to speed up POJO services.

veithen : 
Files : 
* /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/BeanInfoCache.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/BeanInfoCachingClassLoader.java
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java


> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
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


[jira] Updated: (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Dan Armstrong (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Armstrong updated AXIS2-4878:
---------------------------------

    Summary: Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request  (was: Simple BeanInfo cache in BeanUtil.java helped as go from 48 second to 8 second request)

> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138858#comment-13138858 ] 

Hudson commented on AXIS2-4878:
-------------------------------

Integrated in Axis2 #1085 (See [https://builds.apache.org/job/Axis2/1085/])
    AXIS2-4524 / AXIS2-4878 / AXIS2-5118 / AXIS2-5119: Also implement BeanInfoCachingClassLoader on JarFileClassLoader so that the cache works in all deployment scenarios.

veithen : 
Files : 
* /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/classloader/JarFileClassLoader.java

                
> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>            Assignee: Andreas Veithen
>             Fix For: 1.6.2, 1.7.0
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Resolved] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Andreas Veithen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4878.
------------------------------------

       Resolution: Duplicate
    Fix Version/s: 1.7.0
                   1.6.2
         Assignee: Andreas Veithen
    
> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>            Assignee: Andreas Veithen
>             Fix For: 1.6.2, 1.7.0
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Commented] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138760#comment-13138760 ] 

Hudson commented on AXIS2-4878:
-------------------------------

Integrated in axis2-1.6 #141 (See [https://builds.apache.org/job/axis2-1.6/141/])
    AXIS2-4524 / AXIS2-4878 / AXIS2-5118 / AXIS2-5119: Merged r1166132 and r1190499 to the 1.6 branch.

veithen : 
Files : 
* /axis/axis2/java/core/branches/1_6
* /axis/axis2/java/core/branches/1_6/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
* /axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/classloader/BeanInfoCache.java
* /axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/classloader/BeanInfoCachingClassLoader.java
* /axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/classloader/JarFileClassLoader.java
* /axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java

                
> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>            Assignee: Andreas Veithen
>             Fix For: 1.6.2, 1.7.0
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


[jira] [Issue Comment Edited] (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Leon Fleysher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037577#comment-13037577 ] 

Leon Fleysher edited comment on AXIS2-4878 at 5/22/11 12:34 PM:
----------------------------------------------------------------

Please fix this bug -- it makes AXIS2 unusably slow for big XML files.

      was (Author: lfleysher):
    Please fix this bug -- it makes AXIS2 unusable for big XML files.
  
> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
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


[jira] Commented: (AXIS2-4878) Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request

Posted by "Martin Aubele (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003989#comment-13003989 ] 

Martin Aubele commented on AXIS2-4878:
--------------------------------------

PLEASE FIX THIS! This is a real performance killer in our application.

> Simple BeanInfo cache in BeanUtil.java helped us go from 48 second to 8 second request
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4878
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4878
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.2
>         Environment: Linux (Debian Lenny x86_64), JDK 1.6.0, Tomcat 6 (in NetBeans 6.5.1).  Deployed POJO service as .aar file.
>            Reporter: Dan Armstrong
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> We return arrays of complex objects - all of the same type for any particular web services call.  Axis2 was unusably slow.  Upon closer inspection, it was spending much of its time in BeanUtil.  The #1 problem is that it is performing introspection repeatedly for each and every object.  Introspection is very expensive - calling the methods once you find them is cheap.
> The solution is to perform the introspection and cache the results.  I added a few lines of code to BeanUtil.java and brought our request from 48 seconds down to 8.  This solution may not be exactly how you would implement it, but the idea is sound and the results are very impressive:
> import java.util.concurrent.*;
>     private static final ConcurrentMap<Class<?>,BeanInfo> beanInfoCache = new ConcurrentHashMap<Class<?>,BeanInfo>();
>             // About line 140, where calls Introspector.getBeanInfo:
>             BeanInfo beanInfo = beanInfoCache.get(beanClass);
>             if(beanInfo==null) beanInfoCache.put(beanClass, beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()));
> The map would probably need to use weak references to not prevent class unloading.  And you may not want to depend on the Java 5 generics and concurrent collections.  But the point remains - without this POJO is too slow (rhyme intended).
> Please add this to the Axis2 to benefit others.
> Thank you,
> Dan Armstrong
> AO Industries, Inc.

--
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