[
https://issues.apache.org/jira/browse/HTTPCORE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801293#action_12801293
]
Tony Poppleton commented on HTTPCORE-215:
-----------------------------------------
I know this will probably be controversial, but in most places that
BufferedHeader.getName() is called, it is simply compared to another String
using the equalsIgnoreCase method. Therefore, by implementing an
equalsIgnoreCase method on CharArrayBuffer (that takes an optional startIndex
and toIndex) then the String construction in the BufferedHeader constructor can
be avoided all together (which is currently taking 2.2% of the time).
This is similar to the case of HTTPCORE-216 where some Java library
functionality would have to be reimplemented in order to avoid a temporary
String construction.
I have not checked yet, but this custom implementation of
equalsIgnoreCase(String) might benefit other areas that simply construct the
String.
Please advise on what you think of this, and if you would like me to proceed
then I can create a subtask for it.
> Performance hot spots
> ---------------------
>
> Key: HTTPCORE-215
> URL: https://issues.apache.org/jira/browse/HTTPCORE-215
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore
> Reporter: Tony Poppleton
> Priority: Minor
> Attachments: Hot spots using version 4.0.jpg, screenshot-1.jpg,
> screenshot-2.jpg
>
>
> Attached is a snapshot of my application running under JProfiler. My
> application uses HttpClient extensively, and does many request per second.
> It is probably a fairly common use-case of the library under load.
> If anyone has any ideas on how to improve performance on any of the flagged
> methods, then please create a subtask.
> Thanks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]