{"action":"closed","number":10077,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/10077","id":86599319,"html_url":"https://github.com/facebook/react-native/pull/10077","diff_url":"https://github.com/facebook/react-native/pull/10077.diff","patch_url":"https://github.com/facebook/react-native/pull/10077.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/10077","number":10077,"state":"closed","locked":false,"title":"Speeds up Android by avoiding event loop cycling with TextInput usage.","user":{"login":"mikelambert","id":7953259,"avatar_url":"https://avatars.githubusercontent.com/u/7953259?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelambert","html_url":"https://github.com/mikelambert","followers_url":"https://api.github.com/users/mikelambert/followers","following_url":"https://api.github.com/users/mikelambert/following{/other_user}","gists_url":"https://api.github.com/users/mikelambert/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelambert/subscriptions","organizations_url":"https://api.github.com/users/mikelambert/orgs","repos_url":"https://api.github.com/users/mikelambert/repos","events_url":"https://api.github.com/users/mikelambert/events{/privacy}","received_events_url":"https://api.github.com/users/mikelambert/received_events","type":"User","site_admin":false},"body":"This is obviously a bit of a strawman to start a discussion.\n\nWith this change, TextInput._onChange can be called and update _lastNativeText properly.\n\nWithout this change, it doesn't get updated. Which leaves the next componentDidUpdate to call setNativeProps({text:...}) again unnecessarily, which (I believe) is triggering a re-layout, and triggering componentDidUpdate, leading to this cycling in the event loop that makes the Android app slower for me.\n\nThe question is, why don't we want the callbacks called when we update the text from JS? Because that's exactly what TextInput._onChange is expecting.\n\nI'm a bit unclear why calling setNativeProps({text:...}) triggers another call to componentDidUpdate. I did a bunch of tracing and debugging and have a skeleton of who-calls-what I can share, if you're interested. But I'm pretty clueless on the layout logic stuff and suspect it's related to that somehow.\n","created_at":"2016-09-24T00:10:52Z","updated_at":"2016-11-09T20:42:07Z","closed_at":"2016-11-09T20:42:06Z","merged_at":null,"merge_commit_sha":"23a6faf4657985646b548a5489c064169176fbeb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/10077/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/10077/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/10077/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/a4716e1e0ea7b350328050a7eab29d9f5e3f2bba","head":{"label":"mikelambert:textinput","ref":"textinput","sha":"a4716e1e0ea7b350328050a7eab29d9f5e3f2bba","user":{"login":"mikelambert","id":7953259,"avatar_url":"https://avatars.githubusercontent.com/u/7953259?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelambert","html_url":"https://github.com/mikelambert","followers_url":"https://api.github.com/users/mikelambert/followers","following_url":"https://api.github.com/users/mikelambert/following{/other_user}","gists_url":"https://api.github.com/users/mikelambert/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelambert/subscriptions","organizations_url":"https://api.github.com/users/mikelambert/orgs","repos_url":"https://api.github.com/users/mikelambert/repos","events_url":"https://api.github.com/users/mikelambert/events{/privacy}","received_events_url":"https://api.github.com/users/mikelambert/received_events","type":"User","site_admin":false},"repo":{"id":58318059,"name":"react-native","full_name":"mikelambert/react-native","owner":{"login":"mikelambert","id":7953259,"avatar_url":"https://avatars.githubusercontent.com/u/7953259?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelambert","html_url":"https://github.com/mikelambert","followers_url":"https://api.github.com/users/mikelambert/followers","following_url":"https://api.github.com/users/mikelambert/following{/other_user}","gists_url":"https://api.github.com/users/mikelambert/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelambert/subscriptions","organizations_url":"https://api.github.com/users/mikelambert/orgs","repos_url":"https://api.github.com/users/mikelambert/repos","events_url":"https://api.github.com/users/mikelambert/events{/privacy}","received_events_url":"https://api.github.com/users/mikelambert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikelambert/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/mikelambert/react-native","forks_url":"https://api.github.com/repos/mikelambert/react-native/forks","keys_url":"https://api.github.com/repos/mikelambert/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikelambert/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikelambert/react-native/teams","hooks_url":"https://api.github.com/repos/mikelambert/react-native/hooks","issue_events_url":"https://api.github.com/repos/mikelambert/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/mikelambert/react-native/events","assignees_url":"https://api.github.com/repos/mikelambert/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/mikelambert/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/mikelambert/react-native/tags","blobs_url":"https://api.github.com/repos/mikelambert/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikelambert/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikelambert/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikelambert/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikelambert/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/mikelambert/react-native/languages","stargazers_url":"https://api.github.com/repos/mikelambert/react-native/stargazers","contributors_url":"https://api.github.com/repos/mikelambert/react-native/contributors","subscribers_url":"https://api.github.com/repos/mikelambert/react-native/subscribers","subscription_url":"https://api.github.com/repos/mikelambert/react-native/subscription","commits_url":"https://api.github.com/repos/mikelambert/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikelambert/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikelambert/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikelambert/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikelambert/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/mikelambert/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikelambert/react-native/merges","archive_url":"https://api.github.com/repos/mikelambert/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikelambert/react-native/downloads","issues_url":"https://api.github.com/repos/mikelambert/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/mikelambert/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/mikelambert/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/mikelambert/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikelambert/react-native/labels{/name}","releases_url":"https://api.github.com/repos/mikelambert/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/mikelambert/react-native/deployments","created_at":"2016-05-08T15:17:44Z","updated_at":"2016-05-08T15:17:50Z","pushed_at":"2016-11-08T05:25:38Z","git_url":"git://github.com/mikelambert/react-native.git","ssh_url":"git@github.com:mikelambert/react-native.git","clone_url":"https://github.com/mikelambert/react-native.git","svn_url":"https://github.com/mikelambert/react-native","homepage":"http://facebook.github.io/react-native/","size":73755,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"1b2d9a858b8578b9e7e1c892792d07d2b9f83ab9","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-native/deployments","created_at":"2015-01-09T18:10:16Z","updated_at":"2016-11-09T18:29:19Z","pushed_at":"2016-11-09T20:28:27Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":153768,"stargazers_count":40152,"watchers_count":40152,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9042,"mirror_url":null,"open_issues_count":979,"forks":9042,"open_issues":979,"watchers":40152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/10077"},"html":{"href":"https://github.com/facebook/react-native/pull/10077"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/10077"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/10077/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/10077/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/10077/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/a4716e1e0ea7b350328050a7eab29d9f5e3f2bba"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":3,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"hramos"}}