[ https://issues.apache.org/jira/browse/GEODE-7814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Juan Ramos updated GEODE-7814: ------------------------------ Summary: Unnecessary Object Allocations in DistributionMessage (was: Unnecessary Object AllocationsIntroduced in GEODE-7507) > Unnecessary Object Allocations in DistributionMessage > ----------------------------------------------------- > > Key: GEODE-7814 > URL: https://issues.apache.org/jira/browse/GEODE-7814 > Project: Geode > Issue Type: Bug > Components: membership > Reporter: Juan Ramos > Assignee: Juan Ramos > Priority: Major > Labels: GeodeCommons > Attachments: countDifference.png, timeSpent.png > > > The {{DistributionMessage}} class unnecessary allocates instances of > {{java.util.Collection$SingletonList}} and {{InternalDistributedMember[]}} > through the attributes {{EMPTY_RECIPIENTS_ARRAY}} and {{ALL_RECIPIENTS_LIST}}. > These attributes are {{final}} and only used to execute internal comparisons > but, since they are not declared as {{static}}, every instance of > {{DistributionMessage}} will have its own instance, generating unnecessary > garbage. > Using one of our internal testing scenarios and a java profiler we detected > that we create 0 instances of {{java.util.Collection$SingletonList}} and > {{InternalDistributedMember[]}} using Geode 1.10, but 14.824 and 11.212 > respectively when using the latest {{develop}} branch. > The increase in the memory footprint is not much (around 1MB all together), > and the time spent on this operation is around 1.5 seconds slower overall > (screenshots attached). -- This message was sent by Atlassian Jira (v8.3.4#803005)