cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] Resolved: (CXF-3261) JAX-RS: Performance improvement for JAXRSOutInterceptor.checkBufferingMode
Date Fri, 21 Jan 2011 18:13:02 GMT


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

View raw message