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-2263) Get rid of wrapping views where possible.
Date Wed, 30 Dec 2015 15:22:49 GMT

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

Vladimir Ozerov commented on IGNITE-2263:
-----------------------------------------

I almost fully reworked GridFunc. Removed lots of unused methods, fixed dozens of vararg problems.
After that it is evident that we have 3 problematic "view" methods accepting predicate:

1) view(@Nullable final Collection<T> c, final IgnitePredicate<? super T> p) -
64 usages
2) view(@Nullable final Map<K, V> m, final IgnitePredicate<? super K> p) - 2 usages
3) viewReadOnly(@Nullable final Collection<? extends T1> c, final IgniteClosure<?
super T1, T2> trans, @Nullable final IgnitePredicate<? super T1> p) - 17 usages

The main problem here is that isEmpty(), size() and contains() always require full iteration
over collection. We need to carefully review all these usages. 

The rest 3 "view" methods just create wrapper collection with attached transformer. I do not
think they could hurt us anyhow - these are just convenient shortcuts.


> Get rid of wrapping views where possible.
> -----------------------------------------
>
>                 Key: IGNITE-2263
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2263
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: general
>    Affects Versions: ignite-1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>            Priority: Critical
>             Fix For: 1.6
>
>
> We have about ~50-100 usages of things like F.view or F.viewReadOnly. In lots cases it
is not necessary, adds garbage, but doesn't add any value. 
> Need to revisit these places.



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

Mime
View raw message