ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-2502) GridNearAtomicUpdateRequest allocates to much Object[]
Date Mon, 01 Feb 2016 07:44:39 GMT

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

Vladimir Ozerov commented on IGNITE-2502:
-----------------------------------------

Yes, this is exactly what I did.

> GridNearAtomicUpdateRequest allocates to much Object[]
> ------------------------------------------------------
>
>                 Key: IGNITE-2502
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2502
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: cache
>    Affects Versions: 1.5.0.final
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>             Fix For: 1.6
>
>
> *Problem*
> GridNearAtomicUpdateRequest might create up to 4 ArrayList's. Initially they are empty.
When the very first element is added, ArrayList is extended to hold 10 objects (new Object[]).
Put in ATOMIC cache almost all operations are performed on a single key. 
> As a result 90% of array is not used.
> *Proposed solution*
> We know in advance how many keys participate in operation. Let's use min(10, keyCount)
as initial array list size. This will make allocation more accurate.



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

Mime
View raw message