[ 
https://issues.apache.org/jira/browse/IGNITE-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121285#comment-15121285
 ] 

ASF GitHub Bot commented on IGNITE-2273:
----------------------------------------

GitHub user ilantukh opened a pull request:

    https://github.com/apache/ignite/pull/433

    IGNITE-2273

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ilantukh/ignite ignite-2273

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/433.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 #433
    
----
commit 24514125b67e8f8361ab1ce14dc0376719922880
Author: Ilya Lantukh <[email protected]>
Date:   2016-01-28T12:03:06Z

    ignite-2273 : Optimized usage of Arrays.asList().

----


> Arrays.asList() should not be used for 1- and 2- elements.
> ----------------------------------------------------------
>
>                 Key: IGNITE-2273
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2273
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: general
>    Affects Versions: ignite-1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Ilya Lantukh
>             Fix For: 1.6
>
>
> There are several places in code where Arrays.asList is used as follows:
> 1) For a single element. These places should be replaced with 
> Collections.singleton() to avoid unnecessary array allocations.
> 2) For two elements. Here we should create our own "doubled-singleton" 
> implementation.
> Some of these places are located on hot code paths (e.g. cache PUT).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to