Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip() on IReadOnlyList needlessly enumerates skipped items #72424

Closed
vsfeedback opened this issue Jul 19, 2022 · 3 comments
Closed

Skip() on IReadOnlyList needlessly enumerates skipped items #72424

vsfeedback opened this issue Jul 19, 2022 · 3 comments

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
If you call .Skip() on a collection that implements IReadOnlyList but doesn't implement IList, Skip needlessly enumerates all skipped items, whereas on an IList implementation, it makes use of the indexer and does not enumerate the skipped items. This is needlessly inefficient.


Original Comments

TRI-L Data Systems Claudio Friederich on 3/29/2022, 05:35 PM:

(private comment, text removed)

Feedback Bot on 3/29/2022, 11:11 PM:

(private comment, text removed)

Fiona Niu[MSFT] on 6/30/2022, 01:37 AM:

(private comment, text removed)

TRI-L Data Systems Claudio Friederich on 7/11/2022, 02:32 PM:

(private comment, text removed)

TRI-L Data Systems Claudio Friederich on 7/11/2022, 03:23 PM:

(private comment, text removed)

Feedback Bot on 7/6/2022, 11:51 PM:

(private comment, text removed)

Feedback Bot on 7/11/2022, 11:38 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 19, 2022
@ghost
Copy link

ghost commented Jul 19, 2022

Tagging subscribers to this area: @dotnet/area-system-linq
See info in area-owners.md if you want to be subscribed.

Issue Details

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
If you call .Skip() on a collection that implements IReadOnlyList but doesn't implement IList, Skip needlessly enumerates all skipped items, whereas on an IList implementation, it makes use of the indexer and does not enumerate the skipped items. This is needlessly inefficient.


Original Comments

TRI-L Data Systems Claudio Friederich on 3/29/2022, 05:35 PM:

(private comment, text removed)

Feedback Bot on 3/29/2022, 11:11 PM:

(private comment, text removed)

Fiona Niu[MSFT] on 6/30/2022, 01:37 AM:

(private comment, text removed)

TRI-L Data Systems Claudio Friederich on 7/11/2022, 02:32 PM:

(private comment, text removed)

TRI-L Data Systems Claudio Friederich on 7/11/2022, 03:23 PM:

(private comment, text removed)

Feedback Bot on 7/6/2022, 11:51 PM:

(private comment, text removed)

Feedback Bot on 7/11/2022, 11:38 PM:

(private comment, text removed)


Original Solutions

(no solutions)

Author: vsfeedback
Assignees: -
Labels:

area-System.Linq, untriaged

Milestone: -

@eiriktsarpalis
Copy link
Member

Duplicate of #24793. Closing in favor of #42254 which holds a broader conversation on collection interface optimizations.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 19, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants