{"action":"created","comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/235314328","pull_request_review_id":177149157,"id":235314328,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTMxNDMyOA==","diff_hunk":"@@ -119,6 +120,14 @@ export function registerFormatType( name, settings ) {\n \n \tdispatch( 'core/rich-text' ).addFormatTypes( settings );\n \n+\tconst emptyArray = [];\n+\tconst getFunctionStackMemoized = memize( ( previousStack = emptyArray, newFunction ) => {","path":"packages/rich-text/src/register-format-type.js","position":null,"original_position":13,"commit_id":"2fc48e9ab6cddfb0904e5582c39d3c333cba0e9e","original_commit_id":"254cf3360981ea9132f1a0a5a9edb0b713df4b08","user":{"login":"iseulde","id":4710635,"node_id":"MDQ6VXNlcjQ3MTA2MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"body":"No way to cache per instance?","created_at":"2018-11-21T09:42:35Z","updated_at":"2018-11-21T09:42:35Z","html_url":"https://github.com/WordPress/gutenberg/pull/12161#discussion_r235314328","pull_request_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/235314328"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/12161#discussion_r235314328"},"pull_request":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161"}},"in_reply_to_id":235311765},"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161","id":232588778,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNTg4Nzc4","html_url":"https://github.com/WordPress/gutenberg/pull/12161","diff_url":"https://github.com/WordPress/gutenberg/pull/12161.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/12161.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/12161","number":12161,"state":"open","locked":false,"title":"Fix RichText rerendering when it shouldn't","user":{"login":"atimmer","id":584693,"node_id":"MDQ6VXNlcjU4NDY5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/584693?v=4","gravatar_id":"","url":"https://api.github.com/users/atimmer","html_url":"https://github.com/atimmer","followers_url":"https://api.github.com/users/atimmer/followers","following_url":"https://api.github.com/users/atimmer/following{/other_user}","gists_url":"https://api.github.com/users/atimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/atimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atimmer/subscriptions","organizations_url":"https://api.github.com/users/atimmer/orgs","repos_url":"https://api.github.com/users/atimmer/repos","events_url":"https://api.github.com/users/atimmer/events{/privacy}","received_events_url":"https://api.github.com/users/atimmer/received_events","type":"User","site_admin":false},"body":"closes #12150\r\n\r\n## Description\r\n\r\nThe prepareEditableTree and onChangeEditableValue function stacks would have a new reference on every render. This prevents that by memoized the stack based on the previous stack and the newly added function.\r\n\r\n## How has this been tested?\r\n\r\nTested using Yoast SEO. I am working on e2e tests to test that RichText's don't rerender too often.\r\n\r\n## Screenshots <!-- if applicable -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce?  -->\r\n<!-- Bug fix (non-breaking change which fixes an issue) -->\r\n<!-- New feature (non-breaking change which adds functionality) -->\r\n<!-- Breaking change (fix or feature that would cause existing functionality to not work as expected) -->\r\n\r\n## Checklist:\r\n- [ ] My code is tested.\r\n- [ ] My code follows the WordPress code style. <!-- Check code: `npm run lint`, Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/ -->\r\n- [ ] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->\r\n- [ ] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->","created_at":"2018-11-21T09:18:07Z","updated_at":"2018-11-21T09:42:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8547fbe12d8e2a59747923330d00aa98ee136b30","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/WordPress/gutenberg/milestones/79","html_url":"https://github.com/WordPress/gutenberg/milestone/79","labels_url":"https://api.github.com/repos/WordPress/gutenberg/milestones/79/labels","id":3836625,"node_id":"MDk6TWlsZXN0b25lMzgzNjYyNQ==","number":79,"title":"4.5.1","description":"","creator":{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":7,"state":"open","created_at":"2018-11-21T07:45:37Z","updated_at":"2018-11-21T09:27:36Z","due_on":"2018-11-21T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/12161/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/2fc48e9ab6cddfb0904e5582c39d3c333cba0e9e","head":{"label":"WordPress:fix/optimize-rich-text-rerenders","ref":"fix/optimize-rich-text-rerenders","sha":"2fc48e9ab6cddfb0904e5582c39d3c333cba0e9e","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","private":false,"owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-11-21T09:06:17Z","pushed_at":"2018-11-21T09:39:54Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":34700,"stargazers_count":3768,"watchers_count":3768,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1049,"mirror_url":null,"archived":false,"open_issues_count":1567,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1049,"open_issues":1567,"watchers":3768,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"e651069da2302499d1254c3c02442993547a9410","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","private":false,"owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-11-21T09:06:17Z","pushed_at":"2018-11-21T09:39:54Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":34700,"stargazers_count":3768,"watchers_count":3768,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1049,"mirror_url":null,"archived":false,"open_issues_count":1567,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1049,"open_issues":1567,"watchers":3768,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/12161"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/12161"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/12161/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/12161/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/2fc48e9ab6cddfb0904e5582c39d3c333cba0e9e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"iseulde"}}