[ 
https://issues.apache.org/jira/browse/NIFI-15039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael W Moser updated NIFI-15039:
-----------------------------------
    Description: 
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/

  was:
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.
 


> 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: 10m
>  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