{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/371","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/371/comments","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/371/events","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/371","id":60697424,"number":371,"title":"Working range window","user":{"login":"rnystrom","id":739696,"avatar_url":"https://avatars.githubusercontent.com/u/739696?v=3","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/pr%20%E2%80%94%20review%20needed","name":"pr — review needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-11T17:38:07Z","updated_at":"2015-03-11T23:48:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/371","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/371","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/371.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/371.patch"},"body":"This brings back the concept of a window store for nodes that are in the working range (reverting #127). It turns out that due to the system architecture if there are nodes who fetch remote content (e.g. `ASNetworkImageNode`), calls to `-display` will occur before fetching has been completed. The next chance the nodes have to decode and display content is then when they are actually on the screen, thus defeating the purpose of a working range.\r\n\r\nWith the reintroduction of the working range window, nodes are \"stored\" in the window and when content is finished being fetched, CA triggers `-display` since they are part of a view hierarchy.\r\n\r\nThis can be tested in the Kittens project by insuring that before `ASRangeController` adds a node to [a visible view](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/ASRangeController.mm#L57) that the image node (with remote content) has set its layer's contents."},"comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments/78397776","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/371#issuecomment-78397776","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/371","id":78397776,"user":{"login":"rnystrom","id":739696,"avatar_url":"https://avatars.githubusercontent.com/u/739696?v=3","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T23:48:02Z","updated_at":"2015-03-11T23:48:02Z","body":"Also making a note from @appleguy that thrashing a `UIWindow` like this will likely incur some wasted processing on the main thread. Something we should be aware of and fix soon."}}