{"action":"created","issue":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/400","repository_url":"https://api.github.com/repos/onevcat/Kingfisher","labels_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/400/comments","events_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/400/events","html_url":"https://github.com/onevcat/Kingfisher/issues/400","id":171382647,"number":400,"title":"Proper collection view Image cell load","user":{"login":"kwstasna","id":13165044,"avatar_url":"https://avatars.githubusercontent.com/u/13165044?v=3","gravatar_id":"","url":"https://api.github.com/users/kwstasna","html_url":"https://github.com/kwstasna","followers_url":"https://api.github.com/users/kwstasna/followers","following_url":"https://api.github.com/users/kwstasna/following{/other_user}","gists_url":"https://api.github.com/users/kwstasna/gists{/gist_id}","starred_url":"https://api.github.com/users/kwstasna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwstasna/subscriptions","organizations_url":"https://api.github.com/users/kwstasna/orgs","repos_url":"https://api.github.com/users/kwstasna/repos","events_url":"https://api.github.com/users/kwstasna/events{/privacy}","received_events_url":"https://api.github.com/users/kwstasna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-16T11:10:32Z","updated_at":"2016-08-16T14:11:37Z","closed_at":null,"body":"Hello.\r\nAlthough you have been answering to all the questions except mine (lol) I would like some help by implementing your library to this tutorial\r\n\r\nhttp://sweettutos.com/2015/12/31/swift-how-to-asynchronously-download-and-cache-images-without-relying-on-third-party-libraries/\r\n\r\nBecause this tutorial's cache is being deleted as soon as the app is closed.\r\nSo with your library and some lines of code you could make a simple tutorial of how to keep images in disk and not to force reload when the collection view / table view is scrolling.\r\n\r\nCould you help me along with this please?\r\nThanks a lot!"},"comment":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/comments/240113856","html_url":"https://github.com/onevcat/Kingfisher/issues/400#issuecomment-240113856","issue_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/400","id":240113856,"user":{"login":"onevcat","id":1019875,"avatar_url":"https://avatars.githubusercontent.com/u/1019875?v=3","gravatar_id":"","url":"https://api.github.com/users/onevcat","html_url":"https://github.com/onevcat","followers_url":"https://api.github.com/users/onevcat/followers","following_url":"https://api.github.com/users/onevcat/following{/other_user}","gists_url":"https://api.github.com/users/onevcat/gists{/gist_id}","starred_url":"https://api.github.com/users/onevcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onevcat/subscriptions","organizations_url":"https://api.github.com/users/onevcat/orgs","repos_url":"https://api.github.com/users/onevcat/repos","events_url":"https://api.github.com/users/onevcat/events{/privacy}","received_events_url":"https://api.github.com/users/onevcat/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T14:11:37Z","updated_at":"2016-08-16T14:11:37Z","body":"You cannot expect to load an image of several mega bytes so fast unless you do some preloading it to memory. The disk speed of iPhone is at 200MB/s so it will take almost 25ms to load a single 5MB image from disk to memory, it will take more time to decode and render it (which means you cannot scroll at 60 fps and suffer from a frame dropping).\r\n\r\nFor your 0.9 ms loading from memory cache, there is no problem, since you will have 16.7ms per frame to keep your UI at 60FPS. So it is a tradeoff between loading time and memory usage. You could get faster loading time if the images are already in memory (you could use `ImagePrefetcher` to load them from disk before you need to display them).\r\n\r\nSo, I believe you should make your image size smaller. Since you are showing it in a collection view, they should not be so large.\r\n"}}
{"actor":{"display_login":"onevcat"}}