[ https://issues.apache.org/jira/browse/IGNITE-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415025#comment-15415025 ]
ASF GitHub Bot commented on IGNITE-2545: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/ignite/pull/929 > GridCompoundFuture: Allocate ArrayList only if there are >1 futures. > -------------------------------------------------------------------- > > Key: IGNITE-2545 > URL: https://issues.apache.org/jira/browse/IGNITE-2545 > Project: Ignite > Issue Type: Task > Components: general > Affects Versions: 1.5.0.final > Reporter: Vladimir Ozerov > Assignee: Andrew Mashenkov > Labels: performance > Fix For: 1.8 > > > *Problem* > When GridCompoundFuture is created, empty emoty ArrayList for child futures > is allocated immediately. When the very first child future is added, > ArrayList automatically expands to Object[10]. > But in most cases we will have much less than 10 futures, and quite often > there will be only one. > *Proposal* > 1) Run base put/get benchmarks with a single key and several nodes and > estimate amount of child futures. This case be as easy as adding System.out() > to GridCompoundFuture.init() method which will print list size. > 2) Depending on the result we should do one of the following: > - Allocate ArrayList only after second future is added; > - Or allocate ArrayList with fewer amount of elemnts (say, 4) - this depends > on what we will see in during tests. > This should be fairly simple to check and implement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)