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

ASF subversion and git services commented on NIFI-15039:
--------------------------------------------------------

Commit 13919282403984031d06665b27de90c448cef53c in nifi's branch 
refs/heads/main from Michael W Moser
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=1391928240 ]

NIFI-15039 Use List of Enum Values in InvokeHTTP and Elasticsearch Indexing 
(#10372)

- Optimization for iteration over all Enum values on every FlowFile processed

Signed-off-by: David Handermann <[email protected]>

> Replace usage of Enum.values() when called often
> ------------------------------------------------
>
>                 Key: NIFI-15039
>                 URL: https://issues.apache.org/jira/browse/NIFI-15039
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Michael W Moser
>            Assignee: Michael W Moser
>            Priority: Minor
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Each call to Enum.values() copies the Enum's values into a new array. When 
> Enum.values() is called often, this causes extra unnecessary garbage 
> collection pressure.
> Find instances where Enum.values() is called a lot and provide an 
> improvement.  Do not include cases where Enum.values() is called in exception 
> handling or during initialization.
> An interesting blog that explains the values() behavior for one use case:  
> https://www.gamlor.info/wordpress/2017/08/javas-enum-values-hidden-allocations/



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

Reply via email to