{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/27435","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/27435/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/27435/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/27435/events","html_url":"https://github.com/dotnet/corefx/issues/27435","id":299955491,"number":27435,"title":"Remove RunningIndex add a way for IMemoryList to provide seek implementation","user":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars0.githubusercontent.com/u/1697911?v=4","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"labels":[{"id":703517252,"url":"https://api.github.com/repos/dotnet/corefx/labels/api-suggestion","name":"api-suggestion","color":"1d76db","default":false},{"id":821858300,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.IO.Pipelines","name":"area-System.IO.Pipelines","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars0.githubusercontent.com/u/1697911?v=4","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"assignees":[{"login":"pakrym","id":1697911,"avatar_url":"https://avatars0.githubusercontent.com/u/1697911?v=4","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-02-24T17:03:50Z","updated_at":"2018-02-27T03:55:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Addresses https://github.com/dotnet/corefx/issues/26603\r\n\r\nRight now `ReadOnlySequence` walks linked list of segments to implement `GetPosition` operation. We could envision other implementation that could provide better performance in some cases. This API suggestion  focuses on delegating more functionality to `IMemoryList`.\r\n\r\nI propose the following change:\r\n\r\n``` diff\r\npublic interface IMemoryList<T>\r\n{\r\n-    public long RunningIndex { get; }\r\n+    /// Returns <see cref=\"IMemoryList{T}\"/> that contains <typeparamref name=\"T\"/> item offset from beginning of current <see cref=\"IMemoryList{T}\"/> by <paramref name=\"offset\"/>.\r\n+    /// <paramref name=\"localIndex\"/> would contain index inside returned <see cref=\"IMemoryList{T}\"/>\r\n+    public IMemoryList<T> GetNext(long offset, out int localIndex);\r\n\r\n+     /// Returns count of items between start of this <see cref=\"IMemoryList{T}\"/> to <paramref name=\"memoryList\"/>.\r\n+    public long GetLength(IMemoryList<T> memoryList);\r\n}\r\n```\r\n\r\nHas additional benefit of doing less interface calls per operation (GetLength 2->1, GetPosition N->1).\r\n\r\n/cc @terrajobst @KrzysztofCwalina @davidfowl \r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/368739318","html_url":"https://github.com/dotnet/corefx/issues/27435#issuecomment-368739318","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/27435","id":368739318,"user":{"login":"ahsonkhan","id":6527137,"avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T03:55:51Z","updated_at":"2018-02-27T03:55:51Z","author_association":"MEMBER","body":"@pakrym, is this ready for review? If so, please mark it as such."}}
{"actor":{"display_login":"ahsonkhan"}}