Mark Payne created NIFI-3990:
--------------------------------
Summary: 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
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)