You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Madhan Neethiraj (Jira)" <ji...@apache.org> on 2024/06/21 15:18:00 UTC
[jira] [Updated] (RANGER-4787) reduce plugin memory footprint by avoiding creation of unnecessary collections
[ https://issues.apache.org/jira/browse/RANGER-4787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Madhan Neethiraj updated RANGER-4787:
-------------------------------------
Fix Version/s: 2.5.0
> reduce plugin memory footprint by avoiding creation of unnecessary collections
> ------------------------------------------------------------------------------
>
> Key: RANGER-4787
> URL: https://issues.apache.org/jira/browse/RANGER-4787
> Project: Ranger
> Issue Type: Improvement
> Components: plugins
> Reporter: Madhan Neethiraj
> Assignee: Madhan Neethiraj
> Priority: Major
> Fix For: 3.0.0, 2.5.0
>
>
> Model package classes like RangerPolicy initialize collection members with a new collection object (ArrayList/HashMap/HashSet). Many of these members would likely remain empty, resulting in the initialization to be unnecessary. Instead of creating a new collection object, it will help to initialize with Collections.emptyList()/emptySet()/emptyMap() - to save memory while retaining non-null value for collection members.
> Also, set() on these members currently create a new collection object with a copy of the value to be set. This can be avoided by using the given value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)