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

Claus Ibsen commented on CAMEL-20809:
-------------------------------------

Take a look in camel-jms as I think it populate headers when headers are 
requested. It was original design in Camel that heads are lazy created. However 
most components populate some headers so the lazy does not make very much sense.

> camel-core: potential to reduce allocations
> -------------------------------------------
>
>                 Key: CAMEL-20809
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20809
>             Project: Camel
>          Issue Type: Task
>          Components: camel-core
>    Affects Versions: 4.7.0
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Minor
>
> There's a chance we could reduce or delay unnecessary allocations by not 
> creating message headers [when the intention is just to check if headers are 
> present|https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/DefaultMessage.java#L288-L291].
>  
>  



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

Reply via email to