Hello, I've noticed a problem with CXF when using a large amount of HTTP headers. If I keep the total head size at just under 6k and start increasing the number of headers, performance starts to decrease dramatically when the header count goes above 10.
The problem area is in different parts of the code that create a new instance of org.apache.cxf.jaxrs.impl.HttpHeadersImpl to retrieve just one header value. An example of this is the getProtocolHeader method in org.apache.cxf.jaxrs.utils.HttpUtils. HttpHeadersImpl's constructor creates a new MetadataMap for the headers. This copies all the headers into a new map. Then in getRequestHeaders of HttpHeadersImpl, the header values are again copied into a new map and this new map is then returned. Was this done for a particular reason? The reason I can think of is to prevent the original HTTP headers from being overwritten elsewhere in the code. Has anyone else come across performance issues in relation to HTTP headers and JAXRS? Thanks, Gary ........................................................................... Gary Madden Senior Software Engineer ........................................................................... Email: [email protected]<mailto:[email protected]> Skype: gmadden.openet Openet, 6 Beckett Way, Park West Business Park, Dublin 12, Ireland ________________________________ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation, retention or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify [email protected]. Although Openet has taken reasonable precautions to ensure no viruses are present in this email, we cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
