[ https://issues.apache.org/jira/browse/SLING-4591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomek Rękawek reassigned SLING-4591: ------------------------------------ Assignee: Tomek Rękawek > Performance: Consider using a faster empty map in > ResourceMetadata#setParameterMap > ---------------------------------------------------------------------------------- > > Key: SLING-4591 > URL: https://issues.apache.org/jira/browse/SLING-4591 > Project: Sling > Issue Type: Improvement > Components: API > Affects Versions: API 2.9.0 > Reporter: Joel Richard > Assignee: Tomek Rękawek > Priority: Minor > Labels: perfomance > > ResourceMetadata#setParameterMap is called several thousand times per > request. In my case the passed parameterMap is always empty. Since it has to > create a new empty LinkedHashMap for each call, 1-2% of the rendering time is > spent in this method. > Therefore, I would suggest to either ignore empty maps or use > Collections.emptyMap() instead. Both solutions should work if the caller does > not make any undocumented assumptions for getParameterMap(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)