[
https://issues.apache.org/jira/browse/CXF-4134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Fang resolved CXF-4134.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.6
2.5.3
2.4.7
2.3.10
commit fix
http://svn.apache.org/viewvc?rev=1293067&view=rev for trunk
http://svn.apache.org/viewvc?rev=1293068&view=rev for 2.5.x branch
http://svn.apache.org/viewvc?rev=1293069&view=rev for 2.4.x branch
http://svn.apache.org/viewvc?rev=1293070&view=rev for 2.3.x branch
> GZIPOutInterceptor compiles Patterns constantly; they should be compiled once
> and reused
> ----------------------------------------------------------------------------------------
>
> Key: CXF-4134
> URL: https://issues.apache.org/jira/browse/CXF-4134
> Project: CXF
> Issue Type: Improvement
> Components: Core, Transports
> Affects Versions: 2.5.2
> Environment: Any
> Reporter: Matt Bishop
> Assignee: Freeman Fang
> Priority: Minor
> Labels: perfomance
> Fix For: 2.3.10, 2.4.7, 2.5.3, 2.6
>
>
> GZIPOutInterceptor (lines 193 to 195) use two regular expressions to search
> for a pattern in a string. They compile the regex on every call, and on every
> pass through a loop:
> Pattern zeroQ = Pattern.compile(";\\s*q=0(?:\\.0+)?$");
> for (String headerLine : acceptEncodingHeader) {
> String[] encodings = headerLine.trim().split("[,\\s]*,\\s*");
> Compiling patterns is not cheap; please move these patterns (including the
> String.split() pattern) into the constructor or a static member so we don't
> keep recompiling the pattern.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira