You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2021/02/11 17:57:00 UTC

[jira] [Updated] (HTTPCLIENT-1471) ResponseCachingPolicy - eliminate boxing and HashSet

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-1471:
------------------------------------------
    Fix Version/s:     (was: 5.1-beta1)
                   Stuck

> ResponseCachingPolicy - eliminate boxing and HashSet
> ----------------------------------------------------
>
>                 Key: HTTPCLIENT-1471
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1471
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpCache
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: Stuck
>
>
> ResponseCachingPolicy uses 2 HashSets containing a few Integers each for matching int values.
> This involves lots of boxing plus the overhead of the hashSet.
> Since the numbers of integers involved is very small - at most 6 - it seems unnecessary to use hashing. A linear search would likely be quicker.
> If the number of entries were to be rather larger, then Arrays#binarySearch might be better.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org