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

ASF GitHub Bot commented on NIFI-3636:
--------------------------------------

Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/1612
  
    Reviewing...


> Session should not copy FlowFile Attribute Map when creating new FlowFile 
> object unless attributes are changing
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-3636
>                 URL: https://issues.apache.org/jira/browse/NIFI-3636
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 1.2.0
>
>
> Currently, each time we create a new FlowFile object, we do so using 
> StandardFlowFileRecord.Builder and then call fromFlowFile(FlowFile). This 
> copies the attributes map of the given FlowFile. We should instead just set 
> the member variable of the builder to point at the same Map object as the 
> given FlowFile and keep a flag indicating whether or not this was done. If 
> this is done, we must lazily copy the hash map before modifying it. 
> Otherwise, we can point to the same Map object.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to