hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Poppleton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-906) Minor performance improvement to IdleConnectionHandler
Date Sat, 16 Jan 2010 14:27:54 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801178#action_12801178
] 

Tony Poppleton commented on HTTPCLIENT-906:
-------------------------------------------

Thanks.

Agreed, LHM is slower for some operation, however it does have faster iteration performance
(http://www.artima.com/weblogs/viewpost.jsp?thread=122295).  I guess I was optimizing for
my particular use-case where I don't add new connections frequently, but do try and close
idle ones every 5 seconds.

Anyway, am happy either way.

> Minor performance improvement to IdleConnectionHandler
> ------------------------------------------------------
>
>                 Key: HTTPCLIENT-906
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-906
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>            Reporter: Tony Poppleton
>            Priority: Minor
>             Fix For: 4.1 Alpha2
>
>         Attachments: IdleConnectionHandler.java.patch, IdleConnectionHandler.java.patch2,
IdleConnectionHandler.java.patch3
>
>
> The attached patch does the following changes to IdleConnectionHandler
>  - as it iterator over a map of connections, using a LinkedHashMap is a faster
>  - rather than using an iterator over the keyset and subsequently getting the values,
an iterator over the entry set is used instead for efficiency (at least according to FindBugs)
> Note that the patch contains other changes to make variables final where possible. This
was done automatically by Eclipse, and can be removed if desired. However I see no harm in
them, other than they affect more of the code than intended by the patch.

-- 
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


Mime
View raw message