[ https://issues.apache.org/jira/browse/GEODE-9331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated GEODE-9331: ---------------------------------- Labels: GeodeOperationAPI pull-request-available (was: GeodeOperationAPI) > ConnectionTable maintains WeakReference to thread local map for no reason > ------------------------------------------------------------------------- > > Key: GEODE-9331 > URL: https://issues.apache.org/jira/browse/GEODE-9331 > Project: Geode > Issue Type: Improvement > Components: membership > Reporter: Darrel Schneider > Assignee: Darrel Schneider > Priority: Major > Labels: GeodeOperationAPI, pull-request-available > > Every time a p2p thread owned connection is created it is added to a HashMap > kept by the thread in a ThreadLocal. A WeakReference referencing that HashMap > is also added to an ArrayList. But this ArrayList is not actually used for > anything. It is iterated over in ConnectionTable.close to close any of the > thread local connections but all of these connections are also in the > "threadConnectionMap" which is iterated over during close. > So the ArrayList "threadConnMaps" can be removed with no loss of > functionality. Getting rid of it will improve performance the first time a > thread creates a thread owned connection and will reduce the amount of memory > consumed (the ArrayList will have at least one entry for every thread using > thread owned connections but it may have more since the WeakReference can be > slow to be garbage collected). -- This message was sent by Atlassian Jira (v8.3.4#803005)