cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neal Hu (JIRA)" <>
Subject [jira] [Commented] (CXF-6837) Add cache for MessageBodyReader/Writer
Date Sun, 03 Apr 2016 23:51:25 GMT


Neal Hu commented on CXF-6837:

If both ListA and ListB are compatible(matchCriteria and handleMapper, not check readable/writable)
 for the class and mediaType then add both into cache. Select the nearest and readable/writable
provider from candidates(sorted) in the cache for each request.

In other word, we only cache the result of handleMapper and matchCriteria which is the bottle
neck doing get generic type. So the input(class and mediaType) of the handleMapper and matchCriteria
are enough to be the key of the cache.

If we add ListB later, then the providerFactory will be new so that cache will be cleaned.


> Add cache for MessageBodyReader/Writer
> --------------------------------------
>                 Key: CXF-6837
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.1.5, 3.0.8
>         Environment: windows
>            Reporter: Neal Hu
>             Fix For: 3.2.0
>         Attachments:, ProviderFactory.patch
> CXF selects the msgBodyReader/writer in the reader/writer list for every request, which
has big impact to the performance. Jersey also has the cache in org.glassfish.jersey.message.internal.MessageBodyFactory._getMessageBodyReader(...).
I have tried add the cache for CXF in ProviderFactory and been proved that it has improved
7-8% for json requests in JMeter. Please let me know if you'd like me to add the enhancement
for CXF. Thanks. 

This message was sent by Atlassian JIRA

View raw message