[ 
https://issues.apache.org/jira/browse/CAMEL-8262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14287434#comment-14287434
 ] 

Willem Jiang commented on CAMEL-8262:
-------------------------------------

Hi Claus,

I think we can avoid calling assembleKey in the CaseInsensitiveMap putAll 
method if the map instance is CaseInsensitiveMap and it doesn't change the old 
behavior of CaseInsensitiveMap.

> Optimize CaseInsensitiveMap
> ---------------------------
>
>                 Key: CAMEL-8262
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8262
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.15.0
>
>
> The CaseInsensitiveMap can be optimized as currently we keep 2 maps with the 
> original keys + lower case keys.
> But all that can be done from the JDK using a TreeMap with a case insenstice 
> comparator from the JDK itself. This reduces memory (only 1 map) and also 
> better performance as its one map, with the trade-off that walking the map 
> using entrySet no longer supports mutations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to