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

ASF GitHub Bot commented on GEODE-2141:
---------------------------------------

Github user metatype commented on a diff in the pull request:

    https://github.com/apache/incubator-geode/pull/299#discussion_r90025623
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsMonitor.java
 ---
    @@ -114,14 +100,14 @@ protected void monitor(long millisTimeStamp, 
List<ResourceInstance> resourceInst
     
       private final void monitorStatisticIds(long millisTimeStamp,
           List<ResourceInstance> resourceInstances) {
    -    List<StatisticId> statisticIdsToMonitor = statisticIds;
    +    ConcurrentHashSet<StatisticId> statisticIdsToMonitor = statisticIds;
         if (!statisticIdsToMonitor.isEmpty()) {
           // TODO:
         }
       }
     
       protected final void notifyListeners(StatisticsNotification 
notification) {
    -    List<StatisticsListener> listenersToNotify = this.listeners;
    +    ConcurrentHashSet<StatisticsListener> listenersToNotify = 
this.listeners;
    --- End diff --
    
    I don't think this copy is needed since `listeners` is never updated after 
initialization.


> StatisticsMonitor and StatMonitorHandler should use ConcurrentHashSet to 
> store monitors, listeners and statisticIds
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-2141
>                 URL: https://issues.apache.org/jira/browse/GEODE-2141
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Avinash Dongre
>            Assignee: Avinash Dongre
>
> In StatisticsMonitor and StatMonitorHandler List is used to store monitors, 
> listeners and statisticIds.
> We should be using ConcurrentHashSet for performance Reason.
> In my local testing  When I replace the List to 
> com.gemstone.gemfire.internal.concurrent.
> ConcurrentHashSet
> I see significant improvement in creating large number of region creation.
> ( from ~7hrs to ~26 minutes)
> More details about the same is on dev list.
> Refer : http://markmail.org/message/o7td3fczylx4uaet



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to