[ https://issues.apache.org/jira/browse/IGNITE-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411947#comment-15411947 ]
ASF GitHub Bot commented on IGNITE-2545: ---------------------------------------- GitHub user AMashenkov opened a pull request: https://github.com/apache/ignite/pull/929 IGNITE-2545 : Allocate ArrayList for futures only after second future… … is added You can merge this pull request into a Git repository by running: $ git pull https://github.com/AMashenkov/ignite ignite-2545 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/929.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #929 ---- commit 07186d288b5d90034b280b2c9d53e4c572853595 Author: Andrey V. Mashenkov <andrey.mashen...@gmail.com> Date: 2016-08-08T15:23:22Z IGNITE-2545 : Allocate ArrayList for futures only after second future is added ---- > 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)