{"action":"opened","number":6,"pull_request":{"url":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/6","id":86346797,"html_url":"https://github.com/vuejs/vue-animated-list/pull/6","diff_url":"https://github.com/vuejs/vue-animated-list/pull/6.diff","patch_url":"https://github.com/vuejs/vue-animated-list/pull/6.patch","issue_url":"https://api.github.com/repos/vuejs/vue-animated-list/issues/6","number":6,"state":"open","locked":false,"title":"Fix performance issue in applyMoveTransition","user":{"login":"crabmusket","id":904269,"avatar_url":"https://avatars.githubusercontent.com/u/904269?v=3","gravatar_id":"","url":"https://api.github.com/users/crabmusket","html_url":"https://github.com/crabmusket","followers_url":"https://api.github.com/users/crabmusket/followers","following_url":"https://api.github.com/users/crabmusket/following{/other_user}","gists_url":"https://api.github.com/users/crabmusket/gists{/gist_id}","starred_url":"https://api.github.com/users/crabmusket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crabmusket/subscriptions","organizations_url":"https://api.github.com/users/crabmusket/orgs","repos_url":"https://api.github.com/users/crabmusket/repos","events_url":"https://api.github.com/users/crabmusket/events{/privacy}","received_events_url":"https://api.github.com/users/crabmusket/received_events","type":"User","site_admin":false},"body":"`getBoundingClientRect` causes a DOM reflow when the DOM has been written to between calls (see http://stackoverflow.com/a/37686736/945863). So to avoid this, first call `getBoundingClientRect` on each element in one loop with no intermediate writes to the DOM, then use those results while writing to the DOM in a second loop.\r\n\r\nBefore this change, on a list of 23 elements, I was seeing this performance in Chrome:\r\n\r\n![screenshot from 2016-09-23 00-10-26](https://cloud.githubusercontent.com/assets/904269/18751560/cf1d646e-8122-11e6-9659-f7021df8bdf5.png)\r\n\r\nNotice that each call to `getBoundingClientRect` takes around 30ms. With these changes, it now looks like:\r\n\r\n![screenshot from 2016-09-23 00-16-39](https://cloud.githubusercontent.com/assets/904269/18751668/264e104e-8123-11e6-9793-7bd02027ee6e.png)\r\n\r\nAnd the whole call to `applyMoveTransition` is down to 40ms.","created_at":"2016-09-22T14:20:13Z","updated_at":"2016-09-22T14:20:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/6/commits","review_comments_url":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/6/comments","review_comment_url":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vuejs/vue-animated-list/issues/6/comments","statuses_url":"https://api.github.com/repos/vuejs/vue-animated-list/statuses/4350518c95daed32ffcaae69e0e0601155c8833d","head":{"label":"crabmusket:patch-1","ref":"patch-1","sha":"4350518c95daed32ffcaae69e0e0601155c8833d","user":{"login":"crabmusket","id":904269,"avatar_url":"https://avatars.githubusercontent.com/u/904269?v=3","gravatar_id":"","url":"https://api.github.com/users/crabmusket","html_url":"https://github.com/crabmusket","followers_url":"https://api.github.com/users/crabmusket/followers","following_url":"https://api.github.com/users/crabmusket/following{/other_user}","gists_url":"https://api.github.com/users/crabmusket/gists{/gist_id}","starred_url":"https://api.github.com/users/crabmusket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crabmusket/subscriptions","organizations_url":"https://api.github.com/users/crabmusket/orgs","repos_url":"https://api.github.com/users/crabmusket/repos","events_url":"https://api.github.com/users/crabmusket/events{/privacy}","received_events_url":"https://api.github.com/users/crabmusket/received_events","type":"User","site_admin":false},"repo":{"id":68927769,"name":"vue-animated-list","full_name":"crabmusket/vue-animated-list","owner":{"login":"crabmusket","id":904269,"avatar_url":"https://avatars.githubusercontent.com/u/904269?v=3","gravatar_id":"","url":"https://api.github.com/users/crabmusket","html_url":"https://github.com/crabmusket","followers_url":"https://api.github.com/users/crabmusket/followers","following_url":"https://api.github.com/users/crabmusket/following{/other_user}","gists_url":"https://api.github.com/users/crabmusket/gists{/gist_id}","starred_url":"https://api.github.com/users/crabmusket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crabmusket/subscriptions","organizations_url":"https://api.github.com/users/crabmusket/orgs","repos_url":"https://api.github.com/users/crabmusket/repos","events_url":"https://api.github.com/users/crabmusket/events{/privacy}","received_events_url":"https://api.github.com/users/crabmusket/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crabmusket/vue-animated-list","description":"A Vue.js plugin for easily animating `v-for` rendered lists.","fork":true,"url":"https://api.github.com/repos/crabmusket/vue-animated-list","forks_url":"https://api.github.com/repos/crabmusket/vue-animated-list/forks","keys_url":"https://api.github.com/repos/crabmusket/vue-animated-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crabmusket/vue-animated-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crabmusket/vue-animated-list/teams","hooks_url":"https://api.github.com/repos/crabmusket/vue-animated-list/hooks","issue_events_url":"https://api.github.com/repos/crabmusket/vue-animated-list/issues/events{/number}","events_url":"https://api.github.com/repos/crabmusket/vue-animated-list/events","assignees_url":"https://api.github.com/repos/crabmusket/vue-animated-list/assignees{/user}","branches_url":"https://api.github.com/repos/crabmusket/vue-animated-list/branches{/branch}","tags_url":"https://api.github.com/repos/crabmusket/vue-animated-list/tags","blobs_url":"https://api.github.com/repos/crabmusket/vue-animated-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crabmusket/vue-animated-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crabmusket/vue-animated-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/crabmusket/vue-animated-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crabmusket/vue-animated-list/statuses/{sha}","languages_url":"https://api.github.com/repos/crabmusket/vue-animated-list/languages","stargazers_url":"https://api.github.com/repos/crabmusket/vue-animated-list/stargazers","contributors_url":"https://api.github.com/repos/crabmusket/vue-animated-list/contributors","subscribers_url":"https://api.github.com/repos/crabmusket/vue-animated-list/subscribers","subscription_url":"https://api.github.com/repos/crabmusket/vue-animated-list/subscription","commits_url":"https://api.github.com/repos/crabmusket/vue-animated-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/crabmusket/vue-animated-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/crabmusket/vue-animated-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/crabmusket/vue-animated-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/crabmusket/vue-animated-list/contents/{+path}","compare_url":"https://api.github.com/repos/crabmusket/vue-animated-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crabmusket/vue-animated-list/merges","archive_url":"https://api.github.com/repos/crabmusket/vue-animated-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crabmusket/vue-animated-list/downloads","issues_url":"https://api.github.com/repos/crabmusket/vue-animated-list/issues{/number}","pulls_url":"https://api.github.com/repos/crabmusket/vue-animated-list/pulls{/number}","milestones_url":"https://api.github.com/repos/crabmusket/vue-animated-list/milestones{/number}","notifications_url":"https://api.github.com/repos/crabmusket/vue-animated-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crabmusket/vue-animated-list/labels{/name}","releases_url":"https://api.github.com/repos/crabmusket/vue-animated-list/releases{/id}","deployments_url":"https://api.github.com/repos/crabmusket/vue-animated-list/deployments","created_at":"2016-09-22T14:10:54Z","updated_at":"2016-09-22T14:10:55Z","pushed_at":"2016-09-22T14:13:59Z","git_url":"git://github.com/crabmusket/vue-animated-list.git","ssh_url":"git@github.com:crabmusket/vue-animated-list.git","clone_url":"https://github.com/crabmusket/vue-animated-list.git","svn_url":"https://github.com/crabmusket/vue-animated-list","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"vuejs:master","ref":"master","sha":"b709a9a43c4fe89ccec9a37affbb80e06abfba31","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":52018678,"name":"vue-animated-list","full_name":"vuejs/vue-animated-list","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vue-animated-list","description":"A Vue.js plugin for easily animating `v-for` rendered lists.","fork":false,"url":"https://api.github.com/repos/vuejs/vue-animated-list","forks_url":"https://api.github.com/repos/vuejs/vue-animated-list/forks","keys_url":"https://api.github.com/repos/vuejs/vue-animated-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vue-animated-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vue-animated-list/teams","hooks_url":"https://api.github.com/repos/vuejs/vue-animated-list/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vue-animated-list/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vue-animated-list/events","assignees_url":"https://api.github.com/repos/vuejs/vue-animated-list/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vue-animated-list/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vue-animated-list/tags","blobs_url":"https://api.github.com/repos/vuejs/vue-animated-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vue-animated-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vue-animated-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vue-animated-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vue-animated-list/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vue-animated-list/languages","stargazers_url":"https://api.github.com/repos/vuejs/vue-animated-list/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vue-animated-list/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vue-animated-list/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vue-animated-list/subscription","commits_url":"https://api.github.com/repos/vuejs/vue-animated-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vue-animated-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vue-animated-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vue-animated-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vue-animated-list/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vue-animated-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vue-animated-list/merges","archive_url":"https://api.github.com/repos/vuejs/vue-animated-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vue-animated-list/downloads","issues_url":"https://api.github.com/repos/vuejs/vue-animated-list/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vue-animated-list/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vue-animated-list/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vue-animated-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vue-animated-list/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vue-animated-list/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vue-animated-list/deployments","created_at":"2016-02-18T15:50:52Z","updated_at":"2016-09-22T08:08:09Z","pushed_at":"2016-09-22T14:20:13Z","git_url":"git://github.com/vuejs/vue-animated-list.git","ssh_url":"git@github.com:vuejs/vue-animated-list.git","clone_url":"https://github.com/vuejs/vue-animated-list.git","svn_url":"https://github.com/vuejs/vue-animated-list","homepage":null,"size":9,"stargazers_count":271,"watchers_count":271,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":40,"mirror_url":null,"open_issues_count":4,"forks":40,"open_issues":4,"watchers":271,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/6"},"html":{"href":"https://github.com/vuejs/vue-animated-list/pull/6"},"issue":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/issues/6"},"comments":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/vuejs/vue-animated-list/statuses/4350518c95daed32ffcaae69e0e0601155c8833d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"crabmusket"}}