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

Darrel Schneider commented on GEODE-6670:
-----------------------------------------

Some refactoring was done on getCacheServers, in another ticket, so that it no 
longer allocates a new ArrayList every time. But now it allocates a new 
unmodifiable wrapper every time. This is not as bad as before but since the 
wrapped list's identity never changes (it is final), we do not need to allocate 
a new unmodifiable wrapper every time. Instead the wrapper can also be final.


> GemFireCacheImpl.getCacheServers should not allocate a new ArrayList 
> everytime it is called
> -------------------------------------------------------------------------------------------
>
>                 Key: GEODE-6670
>                 URL: https://issues.apache.org/jira/browse/GEODE-6670
>             Project: Geode
>          Issue Type: Improvement
>          Components: core
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Major
>              Labels: performance
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The current implementation of GemFireCacheImpl.getCacheServers allocates a 
> new ArrayList each time it is called if the cache has any cache servers that 
> are not gateway receivers.
> We should instead maintain a list of all the non-gateway cache servers (like 
> we currently do with the "allCacheServers" list).
> I saw the method called multiple times per pr put on a cache server.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to