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

Sergi Vladykin commented on IGNITE-2263:
----------------------------------------

Vova, I see only one scenario when we can benefit from using F.view(): it is 
when we do only a single iteration over resulting view with early stop. Can you 
imagine other cases when it can be beneficial? Lets drop the case when the view 
is getting thrown away immediately without any operations on it. 
In other cases IMO it is safe to copy filtered contents to new ArrayList using 
the API I've suggested above and go with it, it will not be worse than the 
current approach.

I mean I see you point that it is possible to improve isEmpty(), size() and 
contains(), but I don't think it makes sense to reinvent "better" F.view() 
here. Probably it will not be any better than simpler approach anyways.

> 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)

Reply via email to