You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/02/03 20:09:00 UTC

[jira] [Work logged] (COLLECTIONS-803) CaseInsensitiveMap prevent duplicate key conversion on put

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

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

                Author: ASF GitHub Bot
            Created on: 03/Feb/22 20:08
            Start Date: 03/Feb/22 20:08
    Worklog Time Spent: 10m 
      Work Description: Simulant87 opened a new pull request #276:
URL: https://github.com/apache/commons-collections/pull/276


   Improves the performance by re-using the once converted key again when creating a new entry.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

            Worklog Id:     (was: 720383)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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: Nils Faupel
>            Priority: Minor
>              Labels: performance
>          Time Spent: 10m
>  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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)