You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ka-Lok Fung (JIRA)" <ji...@apache.org> on 2011/01/21 03:37:44 UTC
[jira] Created: (CXF-3261) JAX-RS: Performance improvement for
JAXRSOutInterceptor.checkBufferingMode
JAX-RS: Performance improvement for JAXRSOutInterceptor.checkBufferingMode
--------------------------------------------------------------------------
Key: CXF-3261
URL: https://issues.apache.org/jira/browse/CXF-3261
Project: CXF
Issue Type: Improvement
Affects Versions: 2.3.1
Environment: JDK 1.6
Reporter: Ka-Lok Fung
Priority: Critical
Fix For: 2.3.3
While profiling CXF's JAX-RS implementation in a multi-threaded scenario (10 threads simultaneously hitting our JAX-RS CXF-based application, repeated for many iterations), we noticed that a lot of time was spent inside JAXRSOutInterceptor.checkBufferingMode.
After examining the code we determined that the reason why was because InjectionUtils.invokeBooleanGetter was explicitly invoking a method without checking whether or not the method exists. Because the code relies on an exception to determine whether or not the method exists, it's a bit expensive because creating Exceptions is expensive in Java.
Instead of just invoking the method and depending on NoSuchMethodException, can you check to see if the method exists first before calling it? I do realize that it probably involves iterating getMethods() but this should be more efficient than generating the Exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-3261) JAX-RS: Performance improvement for
JAXRSOutInterceptor.checkBufferingMode
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3261.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.4
thanks for profiling it...
> JAX-RS: Performance improvement for JAXRSOutInterceptor.checkBufferingMode
> --------------------------------------------------------------------------
>
> Key: CXF-3261
> URL: https://issues.apache.org/jira/browse/CXF-3261
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 2.3.1
> Environment: JDK 1.6
> Reporter: Ka-Lok Fung
> Assignee: Sergey Beryozkin
> Priority: Critical
> Fix For: 2.4, 2.3.3
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> While profiling CXF's JAX-RS implementation in a multi-threaded scenario (10 threads simultaneously hitting our JAX-RS CXF-based application, repeated for many iterations), we noticed that a lot of time was spent inside JAXRSOutInterceptor.checkBufferingMode.
> After examining the code we determined that the reason why was because InjectionUtils.invokeBooleanGetter was explicitly invoking a method without checking whether or not the method exists. Because the code relies on an exception to determine whether or not the method exists, it's a bit expensive because creating Exceptions is expensive in Java.
> Instead of just invoking the method and depending on NoSuchMethodException, can you check to see if the method exists first before calling it? I do realize that it probably involves iterating getMethods() but this should be more efficient than generating the Exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-3261) JAX-RS: Performance improvement for
JAXRSOutInterceptor.checkBufferingMode
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin updated CXF-3261:
----------------------------------
Component/s: JAX-RS
Assignee: Sergey Beryozkin
> JAX-RS: Performance improvement for JAXRSOutInterceptor.checkBufferingMode
> --------------------------------------------------------------------------
>
> Key: CXF-3261
> URL: https://issues.apache.org/jira/browse/CXF-3261
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 2.3.1
> Environment: JDK 1.6
> Reporter: Ka-Lok Fung
> Assignee: Sergey Beryozkin
> Priority: Critical
> Fix For: 2.3.3
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> While profiling CXF's JAX-RS implementation in a multi-threaded scenario (10 threads simultaneously hitting our JAX-RS CXF-based application, repeated for many iterations), we noticed that a lot of time was spent inside JAXRSOutInterceptor.checkBufferingMode.
> After examining the code we determined that the reason why was because InjectionUtils.invokeBooleanGetter was explicitly invoking a method without checking whether or not the method exists. Because the code relies on an exception to determine whether or not the method exists, it's a bit expensive because creating Exceptions is expensive in Java.
> Instead of just invoking the method and depending on NoSuchMethodException, can you check to see if the method exists first before calling it? I do realize that it probably involves iterating getMethods() but this should be more efficient than generating the Exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.