{"action":"opened","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/3194","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/3194/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/3194/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/3194/events","html_url":"https://github.com/driftyco/ionic/issues/3194","id":59278689,"number":3194,"title":"perf: Improve collection-repeat image performance on iOS","user":{"login":"ajoslin","id":1265995,"avatar_url":"https://avatars.githubusercontent.com/u/1265995?v=3","gravatar_id":"","url":"https://api.github.com/users/ajoslin","html_url":"https://github.com/ajoslin","followers_url":"https://api.github.com/users/ajoslin/followers","following_url":"https://api.github.com/users/ajoslin/following{/other_user}","gists_url":"https://api.github.com/users/ajoslin/gists{/gist_id}","starred_url":"https://api.github.com/users/ajoslin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajoslin/subscriptions","organizations_url":"https://api.github.com/users/ajoslin/orgs","repos_url":"https://api.github.com/users/ajoslin/repos","events_url":"https://api.github.com/users/ajoslin/events{/privacy}","received_events_url":"https://api.github.com/users/ajoslin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T18:58:48Z","updated_at":"2015-02-27T18:58:48Z","closed_at":null,"body":"Problems:\r\n\r\n- Setting an un-cached url to an `img src` gives a 50-200ms freeze on an iPhone 6.\r\n- iOS UIWebView doesn't properly cache remote image urls. Even after setting once to a url, setting again to the same url will cause a noticeable freeze.\r\n\r\nSolutions:\r\n\r\n- Use a [web worker](https://github.com/driftyco/ionic/blob/e18e30fce379875c78e51fb6bf1445d9419153ce/js/utils/workers.js) to fetch image `src`s, fetch them, convert them to base 64, and give them back as a data-uri.\r\n  * This works.. almost. Once an image has been set to a data-uri once, the WebView does properly cache the uri and reloads it instantly when it's set the next time.\r\n\r\nThe last solution needed is a way to cache the data uri into the webview beforehand. This will require some experimentation, but it's doable."}}