cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-6837) Add cache for MessageBodyReader/Writer
Date Sat, 26 Mar 2016 13:07:25 GMT

    [ https://issues.apache.org/jira/browse/CXF-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213002#comment-15213002
] 

Sergey Beryozkin edited comment on CXF-6837 at 3/26/16 1:07 PM:
----------------------------------------------------------------

Neal, selection of the providers is probably one of the most sensitive parts of JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do pass. 
Look at the failing test, understand why it works without your changes, then see why applying
your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider isReadable/isWriteable must
return true. Therefore the key should be the composite one, and the provider should only be
added to the cache if its isReadable/isWriteable returns true. The caching should be optional
too, but I can take care of it later on.

Thanks


was (Author: sergey_beryozkin):
Neal, selection of the providers is probably one of the most sensitive parts of JAX-RS.
I'd like to suggest that you complete the patch work such that indeed tests do pass. 
Look at the failing test, understand why it works without your changes, then see why applying
your changes causes the test to fail.
As I said, the fact MediaType matches is not enough, the provider is isReadable/isWriteable
must return true. Therefore the key should be the composite one, and the provider should only
be added to the cache if its isReadable/isWriteable returns true. The caching should be optional
too, but I can take care if it later on.

Thanks

> Add cache for MessageBodyReader/Writer
> --------------------------------------
>
>                 Key: CXF-6837
>                 URL: https://issues.apache.org/jira/browse/CXF-6837
>             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: ProviderCache.java, 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. 
> http://cxf.547215.n5.nabble.com/MessageBodyReader-Writer-cache-td5767091.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message