You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Pelladi Gabor (JIRA)" <ji...@apache.org> on 2012/10/17 15:38:02 UTC

[jira] [Created] (WW-3902) Performance - Locks in class loader

Pelladi Gabor created WW-3902:
---------------------------------

             Summary: Performance - Locks in class loader
                 Key: WW-3902
                 URL: https://issues.apache.org/jira/browse/WW-3902
             Project: Struts 2
          Issue Type: Improvement
          Components: Plugin - JSON
    Affects Versions: 2.3.5
            Reporter: Pelladi Gabor
            Priority: Minor


JSONWriter is causing locks in class loader, because it always invokes Introspector.getBeanInfo(). That in turn tries to load a class with "BeanInfo" suffix in Introspector.findExplicitBeanInfo(). Such class does not exists, but we try to load it over and over again for every JSON result. Class loading involves a lock in the application server, and this causes performance issue in heavily multithreaded applications.
This could be solved by caching the BeanInfo for the classes, for which I have created a patch.
The issue is also mentioned here:
http://stackoverflow.com/questions/12728860/java-performance-issue-tomcat-webappclassloader-locked

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3902) Performance - Locks in class loader

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

Hudson commented on WW-3902:
----------------------------

Integrated in Struts2 #547 (See [https://builds.apache.org/job/Struts2/547/])
    WW-3902 adds cache for BeanInfo to improve performance and avoid dead locks (Revision 1399375)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java

                
> Performance - Locks in class loader
> -----------------------------------
>
>                 Key: WW-3902
>                 URL: https://issues.apache.org/jira/browse/WW-3902
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JSON
>    Affects Versions: 2.3.5
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, performance
>             Fix For: 2.3.6
>
>         Attachments: WW-3902.diff
>
>
> JSONWriter is causing locks in class loader, because it always invokes Introspector.getBeanInfo(). That in turn tries to load a class with "BeanInfo" suffix in Introspector.findExplicitBeanInfo(). Such class does not exists, but we try to load it over and over again for every JSON result. Class loading involves a lock in the application server, and this causes performance issue in heavily multithreaded applications.
> This could be solved by caching the BeanInfo for the classes, for which I have created a patch.
> The issue is also mentioned here:
> http://stackoverflow.com/questions/12728860/java-performance-issue-tomcat-webappclassloader-locked

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3902) Performance - Locks in class loader

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

Pelladi Gabor updated WW-3902:
------------------------------

    Attachment: WW-3902.diff

Patch to fix locking problem
                
> Performance - Locks in class loader
> -----------------------------------
>
>                 Key: WW-3902
>                 URL: https://issues.apache.org/jira/browse/WW-3902
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JSON
>    Affects Versions: 2.3.5
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, performance
>         Attachments: WW-3902.diff
>
>
> JSONWriter is causing locks in class loader, because it always invokes Introspector.getBeanInfo(). That in turn tries to load a class with "BeanInfo" suffix in Introspector.findExplicitBeanInfo(). Such class does not exists, but we try to load it over and over again for every JSON result. Class loading involves a lock in the application server, and this causes performance issue in heavily multithreaded applications.
> This could be solved by caching the BeanInfo for the classes, for which I have created a patch.
> The issue is also mentioned here:
> http://stackoverflow.com/questions/12728860/java-performance-issue-tomcat-webappclassloader-locked

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WW-3902) Performance - Locks in class loader

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

Lukasz Lenart resolved WW-3902.
-------------------------------

    Resolution: Fixed
      Assignee: Lukasz Lenart

Patch applied, thanks!
                
> Performance - Locks in class loader
> -----------------------------------
>
>                 Key: WW-3902
>                 URL: https://issues.apache.org/jira/browse/WW-3902
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JSON
>    Affects Versions: 2.3.5
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, performance
>             Fix For: 2.3.6
>
>         Attachments: WW-3902.diff
>
>
> JSONWriter is causing locks in class loader, because it always invokes Introspector.getBeanInfo(). That in turn tries to load a class with "BeanInfo" suffix in Introspector.findExplicitBeanInfo(). Such class does not exists, but we try to load it over and over again for every JSON result. Class loading involves a lock in the application server, and this causes performance issue in heavily multithreaded applications.
> This could be solved by caching the BeanInfo for the classes, for which I have created a patch.
> The issue is also mentioned here:
> http://stackoverflow.com/questions/12728860/java-performance-issue-tomcat-webappclassloader-locked

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3902) Performance - Locks in class loader

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

Lukasz Lenart updated WW-3902:
------------------------------

    Fix Version/s: 2.3.6
    
> Performance - Locks in class loader
> -----------------------------------
>
>                 Key: WW-3902
>                 URL: https://issues.apache.org/jira/browse/WW-3902
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - JSON
>    Affects Versions: 2.3.5
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, performance
>             Fix For: 2.3.6
>
>         Attachments: WW-3902.diff
>
>
> JSONWriter is causing locks in class loader, because it always invokes Introspector.getBeanInfo(). That in turn tries to load a class with "BeanInfo" suffix in Introspector.findExplicitBeanInfo(). Such class does not exists, but we try to load it over and over again for every JSON result. Class loading involves a lock in the application server, and this causes performance issue in heavily multithreaded applications.
> This could be solved by caching the BeanInfo for the classes, for which I have created a patch.
> The issue is also mentioned here:
> http://stackoverflow.com/questions/12728860/java-performance-issue-tomcat-webappclassloader-locked

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira