{"action":"created","issue":{"url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/11","labels_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/11/comments","events_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/11/events","html_url":"https://github.com/fo-dicom/fo-dicom/pull/11","id":79324903,"number":11,"title":"Change ByteBufferEnumerator<T>.Create(...).ToArray() to IO.ByteConver…","user":{"login":"IanYates","id":1314477,"avatar_url":"https://avatars.githubusercontent.com/u/1314477?v=3","gravatar_id":"","url":"https://api.github.com/users/IanYates","html_url":"https://github.com/IanYates","followers_url":"https://api.github.com/users/IanYates/followers","following_url":"https://api.github.com/users/IanYates/following{/other_user}","gists_url":"https://api.github.com/users/IanYates/gists{/gist_id}","starred_url":"https://api.github.com/users/IanYates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanYates/subscriptions","organizations_url":"https://api.github.com/users/IanYates/orgs","repos_url":"https://api.github.com/users/IanYates/repos","events_url":"https://api.github.com/users/IanYates/events{/privacy}","received_events_url":"https://api.github.com/users/IanYates/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-22T07:03:51Z","updated_at":"2015-05-23T22:32:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fo-dicom/fo-dicom/pulls/11","html_url":"https://github.com/fo-dicom/fo-dicom/pull/11","diff_url":"https://github.com/fo-dicom/fo-dicom/pull/11.diff","patch_url":"https://github.com/fo-dicom/fo-dicom/pull/11.patch"},"body":"…ter.ToArray<T>(...) throughout the codebase\r\n\r\nI think we could still improve on the code in DicomElement.cs since, in several of the cases, .ToArray() is being called to then just throw away the array to fetch a single item.  This change is certainly no worse than the old code (and is indeed better perf-wise) but I suspect we could sometimes keep the ByteBufferEnumerator and use Linq to apply .Skip(item-1).First() on the IEnumerable<T>.\r\n\r\nI figured I'd jump in and make this change after seeing a bit of a discussion in gitter."},"comment":{"url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/comments/104951558","html_url":"https://github.com/fo-dicom/fo-dicom/pull/11#issuecomment-104951558","issue_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/11","id":104951558,"user":{"login":"hdesouky","id":2395913,"avatar_url":"https://avatars.githubusercontent.com/u/2395913?v=3","gravatar_id":"","url":"https://api.github.com/users/hdesouky","html_url":"https://github.com/hdesouky","followers_url":"https://api.github.com/users/hdesouky/followers","following_url":"https://api.github.com/users/hdesouky/following{/other_user}","gists_url":"https://api.github.com/users/hdesouky/gists{/gist_id}","starred_url":"https://api.github.com/users/hdesouky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdesouky/subscriptions","organizations_url":"https://api.github.com/users/hdesouky/orgs","repos_url":"https://api.github.com/users/hdesouky/repos","events_url":"https://api.github.com/users/hdesouky/events{/privacy}","received_events_url":"https://api.github.com/users/hdesouky/received_events","type":"User","site_admin":false},"created_at":"2015-05-23T22:32:29Z","updated_at":"2015-05-23T22:32:29Z","body":"I have one thing to add here, using MemoryMappedFile instead of heap memory will enable fo-dicom with large studies (tri-phasic and angiography) without requiring high pressure on memory.\r\n\r\nI created a special implementation of IByteBuffer using memory mapped files and it is working great in production.\r\n\r\nMy concern is I don't think this will not work with portable version of the library (using portable libraries)\r\n\r\nWhat do you think? Do you like to incorporate this into consideration?"}}