You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Tony Poppleton (JIRA)" <ji...@apache.org> on 2010/01/16 21:25:57 UTC

[jira] Created: (HTTPCORE-215) Performance hot spots

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


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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-215) Performance hot spots

Posted by "Tony Poppleton (JIRA)" <ji...@apache.org>.
    [ 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-215) Performance hot spots

Posted by "Tony Poppleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Poppleton updated HTTPCORE-215:
------------------------------------

    Attachment: screenshot-1.jpg

> 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: screenshot-1.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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCORE-215) Performance hot spots

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-215.
----------------------------------------

    Resolution: Fixed

Closing as FIXED

Please re-open if you have any other optimization ideas

Oleg

> 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
>             Fix For: 4.1-beta1
>
>         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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Commented: (HTTPCORE-215) Performance hot spots

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCORE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801379#action_12801379 ] 

Oleg Kalnichevski commented on HTTPCORE-215:
--------------------------------------------

> 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

I actually find it to be a better idea than custom int parsing / formatting. 

> If anyone has any ideas on how to improve performance on any of the flagged methods, then please create a subtask.

I personally do not see many possibilities, if any at all, for anything other than fractional performance improvements. HTTPCORE-177 is probably the only thing that can potentially result in an over 1% throughput increase.

I should also should mention that you ought to be reusing the same HttpContext instance for all logically related requests. This could eliminate extra HashMap#Entry instantiations (4th hot spot)

Oleg

> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-215) Performance hot spots

Posted by "Tony Poppleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Poppleton updated HTTPCORE-215:
------------------------------------

    Attachment: screenshot-2.jpg

Attaching an expanded screenshot of the top hot spot

> 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: 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCORE-215) Performance hot spots

Posted by "Tony Poppleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Poppleton updated HTTPCORE-215:
------------------------------------

    Attachment: Hot spots using version 4.0.jpg

The screenshot entitled "Hot spots using version 4.0" was taken using the latest released distribution of the 4.0 stream.

The two previous screenshots were actually taken on a modified trunk that uses the BasicLineParser patch with a custom parseInt that can be found attached to HTTPCORE-212

It is interesting to note that the String.init dropped from 3rd to 4th hot spot between the screenshots, which implies that the patch is effective at improving performance (although not a proper proof).

> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org