Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1471

ResponseCachingPolicy - eliminate boxing and HashSet

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb

              Dates

              • Created:
                Updated:

                Issue deployment