[
https://issues.apache.org/jira/browse/CXF-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-3285.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.4
Assignee: Sergey Beryozkin
Here is fix: http://svn.apache.org/viewvc?rev=1063267&view=rev
thanks
> JAX-RS: Avoid implicit use of regular expression in
> JAXRSUtils.intersectMimeTypes
> ---------------------------------------------------------------------------------
>
> Key: CXF-3285
> URL: https://issues.apache.org/jira/browse/CXF-3285
> 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: Minor
> Fix For: 2.4, 2.3.3
>
>
> While profiling CXF 2.3.1, we found that a small hotspot in
> JAXRSUtils.intersectMimeTypes.
> Splitting on + triggers the Pattern to be compiled twice and caused
> unnecessary code to be run because you're only interested in strings that
> only have one +. When we replaced that code with equivalent code using
> String.indexOf and String.substring, the code was ~3% faster.
> In terms of absolute time in milliseconds here are the values (the test
> involved 1 million requests),
> Index of and substring:
> 2635933-361906=2274027
> No intersect improvement:
> 2724713-367039=2357674
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.