Vladimir Ozerov created IGNITE-2545: ---------------------------------------
Summary: 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: Sub-task Components: general Affects Versions: 1.5.0.final Reporter: Vladimir Ozerov Fix For: 1.6 *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)