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

[jira] [Created] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Pelladi Gabor created OGNL-224:
----------------------------------

             Summary: Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
                 Key: OGNL-224
                 URL: https://issues.apache.org/jira/browse/OGNL-224
             Project: Commons OGNL
          Issue Type: Improvement
          Components: Core Runtime
    Affects Versions: 3.0
            Reporter: Pelladi Gabor
            Priority: Minor


I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
OGNL handles this very bad, it enters
synchronized (_genericMethodParameterTypesCache)
all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.

I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
https://github.com/jkuhnert/ognl

I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

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

Pelladi Gabor updated OGNL-224:
-------------------------------

    Attachment: OgnlRuntimeTest.java

Test that measures performance.
Results in sec before patch: 13.499, 21.348, 1.966, 3.434, 17.479, 1.161
Results in sec after patch: 7.375, 0.387, 0.313, 3.409, 1.064, 0.257

The typical workload in our case was test 5, which went from 17 sec to 1 sec.
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483068#comment-13483068 ] 

Lukasz Lenart commented on OGNL-224:
------------------------------------

The plan is ;-) I started working on that few days ago, basically what's needed is to satisfy RM needs which means all the reports have to be green :-)

http://commons.apache.org/ognl/project-reports.html
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, perfomance
>             Fix For: 3.0
>
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Pelladi Gabor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483037#comment-13483037 ] 

Pelladi Gabor commented on OGNL-224:
------------------------------------

Thank you. Monday and Tuesday were a national holiday in Hungary, that is why I did not read your answer until today.
By the way, is there any plan to release OGNL 4.0, and Struts2 depending on OGNL 4.0? I have seen some activity in 2011, but this year not so much.
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, perfomance
>             Fix For: 3.0
>
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

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

Lukasz Lenart resolved OGNL-224.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

it'll be included with 3.0.6 release
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, perfomance
>             Fix For: 3.0
>
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481194#comment-13481194 ] 

Lukasz Lenart commented on OGNL-224:
------------------------------------

Or could you prepare a pull request ?
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480039#comment-13480039 ] 

Simone Tripodi commented on OGNL-224:
-------------------------------------

thanks for clarifying - I would suggest you so to attach that patch to the GitHub project issue tracker, otherwise it would be not easy to get a chance they notice and apply it.

Yet another help you could give us, is pinging OGNL committers (some of them are Struts committers) on working towards a 4.0 release! :)
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Pelladi Gabor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480028#comment-13480028 ] 

Pelladi Gabor commented on OGNL-224:
------------------------------------

It is designed for the github version, in ASF (4.0-SNAPSHOT) the whole caching has been rewritten.
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481192#comment-13481192 ] 

Lukasz Lenart commented on OGNL-224:
------------------------------------

I will merge it to OGNL git source and prepare a new version.
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482606#comment-13482606 ] 

Lukasz Lenart commented on OGNL-224:
------------------------------------

Done, I was able to merge the patch into current source code
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Assignee: Lukasz Lenart
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

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

Pelladi Gabor updated OGNL-224:
-------------------------------

    Attachment: OGNL-224.patch

Patch to fix this issue
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

--
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] (OGNL-224) Performance - Locking and performance problem with OgnlRuntime.findParameterTypes

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479908#comment-13479908 ] 

Simone Tripodi commented on OGNL-224:
-------------------------------------

Sorry for the question: is the patch designed to be applied in current ASF trunk or for the GitHub version?
                
> Performance - Locking and performance problem with OgnlRuntime.findParameterTypes
> ---------------------------------------------------------------------------------
>
>                 Key: OGNL-224
>                 URL: https://issues.apache.org/jira/browse/OGNL-224
>             Project: Commons OGNL
>          Issue Type: Improvement
>          Components: Core Runtime
>    Affects Versions: 3.0
>            Reporter: Pelladi Gabor
>            Priority: Minor
>              Labels: patch, perfomance
>         Attachments: OGNL-224.patch, OgnlRuntimeTest.java
>
>
> I am using struts2 and under heavy load (around 100 threads) many threads are in BLOCKED state because of OgnlRuntime.findParameterTypes(). The actions we use have a generic superclass like:
> public class PersonalCaptureAction extends DataCaptureAction<PersonalDTO>
> OGNL handles this very bad, it enters
> synchronized (_genericMethodParameterTypesCache)
> all the time, at every property access of the Action. A possible workaround is to introduce another layer of superclass that is not generic.
> I know that in current OGNL trunk (4.0-SNAPSHOT) caching has been rewritten, but Struts2 is using 3.0.5, and maybe it could be fixed as 3.0.6 in the git tree I found:
> https://github.com/jkuhnert/ognl
> I will attach a patch and a testcase.

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