[ 
https://issues.apache.org/jira/browse/COLLECTIONS-803?focusedWorklogId=833311&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-833311
 ]

ASF GitHub Bot logged work on COLLECTIONS-803:
----------------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Dec/22 07:49
            Start Date: 14/Dec/22 07:49
    Worklog Time Spent: 10m 
      Work Description: Simulant87 commented on PR #276:
URL: 
https://github.com/apache/commons-collections/pull/276#issuecomment-1350566817

   @garydgregory May I request another review, to get my PR merged? I think the 
PR is complete with a test covering the new code, no conflicts to the main 
branch, and the pipeline is green.




Issue Time Tracking
-------------------

    Worklog Id:     (was: 833311)
    Time Spent: 1h 50m  (was: 1h 40m)

> CaseInsensitiveMap prevent duplicate key conversion on put
> ----------------------------------------------------------
>
>                 Key: COLLECTIONS-803
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-803
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Map
>    Affects Versions: 4.4
>            Reporter: Simulant
>            Priority: Minor
>              Labels: performance
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> When adding a new item into a {{CaseInsensitiveMap}} the {{convertKey(key)}} 
> method is called twice, once in the {{put(key, value)}} method and second in 
> the {{createEntry(next, hashCode, key, value)}} method. The result could be 
> re-used resulting in a better performance.
> Depending on the {{toString()}} implementation of the key and the resulting 
> length of the key before the lower case conversion the operation can get 
> expensive and should not be called twice, as the {{CaseInsensitiveMap}} 
> overwrites the {{convertKey(key)}} method and makes it more expensive and 
> depending on the input unlike in the implementation of the 
> {{AbstractHashedMap}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to