[ https://issues.apache.org/jira/browse/CXF-6826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186956#comment-15186956 ]
ASF GitHub Bot commented on CXF-6826: ------------------------------------- GitHub user asoldano opened a pull request: https://github.com/apache/cxf/pull/121 [CXF-6826] Cache MediaTypeHeaderProvider.valueOf results You can merge this pull request into a Git repository by running: $ git pull https://github.com/asoldano/cxf CXF-6826 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cxf/pull/121.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #121 ---- commit b5c5c07f363498c0d84c57cbc3f05135bb04104c Author: Alessio Soldano <asold...@redhat.com> Date: 2016-03-09T11:09:11Z [CXF-6826] Cache MediaTypeHeaderProvider.valueOf results ---- > Cache MediaTypeHeaderProvider.valueOf(String mType) results > ----------------------------------------------------------- > > Key: CXF-6826 > URL: https://issues.apache.org/jira/browse/CXF-6826 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Reporter: Alessio Soldano > > MediaTypeHeaderProvider.valueOf(String mType) ends up being called a lot with > the same parameter values, as those are basically the contents of the > @Produce annotations on resources. Each request ends up into the same > invocation, which is cpu and memory intensive. > It might make sense to add a map in the MediaTypeHeaderProvider to store the > result of the static valueOf method invocation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)