[
https://issues.apache.org/jira/browse/NIFI-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16034731#comment-16034731
]
ASF subversion and git services commented on NIFI-3990:
-------------------------------------------------------
Commit 37be0b9820097160d393d90f1dcf84d2d08669b0 in nifi's branch
refs/heads/master from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=37be0b9 ]
NIFI-3990: This closes #1870. Avoided creating garbage when we can avoid it in
the JSON and csv readers and json writer
Signed-off-by: joewitt <[email protected]>
> Reduce excessive garbage collection caused by record readers
> ------------------------------------------------------------
>
> Key: NIFI-3990
> URL: https://issues.apache.org/jira/browse/NIFI-3990
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Mark Payne
> Assignee: Mark Payne
> Fix For: 1.3.0
>
>
> Record Readers and writers use the DataTypeUtils class to coerce an object of
> one type to another type. Often, these methods are called with a
> Supplier<DateFormat> to avoid creating DateFormat objects when not necessary.
> However, the Supplier is typically created inline with a lambda when it
> doesn't need to be, and this creates significant pressure on the garbage
> collector.
> Also, the JSON Reader performs a significant amount of string concatenation
> when it encounters a Map, in order to generate the field name including the
> Map Key. This is done only so that the map key is included in the error
> message if one occurs. However, I think this should be avoided, since the
> error message already indicates the name of the map field and the value that
> could not be coerced. Avoiding the concatenation there will cut down
> significantly on GC pressure, as evidenced by object creation profiling.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)