You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2019/04/30 17:15:00 UTC
[jira] [Resolved] (GEODE-6704) AbstractRegion.allGatewaySenderIds
can be improved
[ https://issues.apache.org/jira/browse/GEODE-6704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darrel Schneider resolved GEODE-6704.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.10.0
> AbstractRegion.allGatewaySenderIds can be improved
> --------------------------------------------------
>
> Key: GEODE-6704
> URL: https://issues.apache.org/jira/browse/GEODE-6704
> Project: Geode
> Issue Type: Improvement
> Components: core
> Reporter: Darrel Schneider
> Assignee: Darrel Schneider
> Priority: Minor
> Labels: performance
> Fix For: 1.10.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Two things I noticed about AbstractRegion.allGatewaySenderIds that can be easily improved:
> # It is currently implemented with CopyOnWriteArraySet but is never modified in place and is searched. These searches end up doing a linear search since the underlying impl is an ArrayList.
> # The gettor method for allGatewaySenderIds always creates an unmodifiable wrapper. This is just garbage since the set is never modified.
> A prototype fix is in: 9d978c615d4e6ccfc3d1ab731cf2e76bb59d1fec
> The settor method now uses a HashSet and makes sure that it is always wrapped in an unmodifiable wrapper. This allows the gettor to just return the reference.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)